[R] arrow on contour line

2024-01-10 Thread Deepankar Basu
Hello, I am drawing contour lines for a function of 2 variables at one level of the value of the function and want to include a small arrow in any direction of increase of the function. Is there some way to do that? Below is an example that creates the contour lines. How do I add one small arrow

[R] variable name question

2011-10-09 Thread Deepankar Basu
Hi All, This is surely an easy question but somehow I am not being able to get it. I am using R 2.13.2 and have a data set where variable names like this appear: pci1990, pci1991, ... , pci2009. pci1990 has data on per capita income for 1990, pci1991 has data on per capita income for 1991, and

Re: [R] variable name question

2011-10-09 Thread Deepankar Basu
Thanks for both comments. Indeed the sep = is needed. On Sun, Oct 9, 2011 at 9:43 PM, Rolf Turner rolf.tur...@xtra.co.nz wrote: On 10/10/11 04:53, R. Michael Weylandt wrote: SNIP Try this: for (i in 1990:2009) { varName = paste(pci, i, collapse = ) assign(varName,

[R] data management question

2008-05-09 Thread Deepankar Basu
Hi all, I have a data management question. I am using an panel dataset read into R as a dataframe, call it ex. The variables in ex are: id year x id: a character string which identifies the unit year: identifies the time period x: the variable of interest (which might contain NAs). Here is

Re: [R] speeding up likelihood computation

2007-12-03 Thread Deepankar Basu
shows to indicate where to focus on. On Dec 2, 2007 12:49 PM, DEEPANKAR BASU [EMAIL PROTECTED] wrote: R Users: I am trying to estimate a model of fertility behaviour using birth history data with maximum likelihood. My code works but is extremely slow (because of several for loops

Re: [R] speeding up likelihood computation

2007-12-03 Thread Deepankar Basu
on. On Dec 2, 2007 12:49 PM, DEEPANKAR BASU [EMAIL PROTECTED] wrote: R Users: I am trying to estimate a model of fertility behaviour using birth history data with maximum likelihood. My code works but is extremely slow (because of several for loops and my programming inefficiencies); when

[R] speeding up likelihood computation

2007-12-02 Thread DEEPANKAR BASU
R Users: I am trying to estimate a model of fertility behaviour using birth history data with maximum likelihood. My code works but is extremely slow (because of several for loops and my programming inefficiencies); when I use the genetic algorithm to optimize the likelihood function, it takes

[R] C++ and R interface

2007-11-06 Thread Deepankar Basu
Hi All, I am trying to do an ML estimation in R. My likelihood function has several nested loops and so it takes a lot of time (days when I use the genetic algorithm for optimization) for the optimization to finish. Unable to avoid loops, I am thinking of writing the likelihood function in C++

Re: [R] C++ and R interface

2007-11-06 Thread Deepankar Basu
Thanks for the help. On Tue, 2007-11-06 at 14:48 -0200, Alberto Monteiro wrote: Deepankar Basu wrote: I am trying to do an ML estimation in R. My likelihood function has several nested loops and so it takes a lot of time (days when I use the genetic algorithm for optimization

Re: [R] finding birth position

2007-10-26 Thread Deepankar Basu
4 5 [[4]] b2 2 [[5]] b1 1 [[6]] b2 b4 2 4 On 10/25/07, Deepankar Basu [EMAIL PROTECTED] wrote: Hi All, I have data on the sequence of births for families with completed fertility cycle (in a data frame); the relevant variables are called b1, b2

[R] finding birth position

2007-10-25 Thread Deepankar Basu
Hi All, I have data on the sequence of births for families with completed fertility cycle (in a data frame); the relevant variables are called b1, b2, b3, b4, b5, b6 and record the birth of the first, second, ..., sixth child. So, b1=1 if the first birth is male, b1=2 if the first birth is