Re: [R] Help on simple problem with optim

2010-09-13 Thread Cristian Montes
Did you check if the data in "da" has any NA in the dependent or the independent data? Remember that your function llk.mar is going to evaluate dnorm for each pair. If any of those pairs has an NA value, your function will return an NA at the end (sum(c(NA,1,2,3)) = NA) I would check if the ll

[R] diff in multiple columns by groups?

2010-08-13 Thread Cristian Montes
Hi, Is there a way to apply the diff operator over a large data frame, by groups in a single function? I have a toy data frame that looks like this: MEASUREMENT BLOCK TRATMENT VALUE1 VALUE2 1 1

Re: [R] Tobit Modelling

2010-08-06 Thread Cristian Montes
probabilities. The code above was implemented for nonlinear regression, so you can put any model you want with minor changes and it will work identically. Cheers, Cristian. ----- Cristian Montes Site Productivity Division Head Bioforest S.A. -Mensaje original

Re: [R] concatenate values in the vector

2010-08-03 Thread Cristian Montes
ers, Cristián. -Mensaje original- De: David Winsemius [mailto:dwinsem...@comcast.net] Enviado el: Martes, 03 de Agosto de 2010 05:26 p.m. Para: Cristian Montes CC: Henrique Dallazuanna; r-help Asunto: Re: [R] concatenate values in the vector On Aug 3, 2010, at 5:17 PM, Cristian Montes wrot

Re: [R] Confidence Bands in nonlinear regression using optim and maximum likelihood

2010-08-03 Thread Cristian Montes
ion Head Bioforest S.A. Chile -Mensaje original- De: Peter Dalgaard [mailto:pda...@gmail.com] Enviado el: Martes, 03 de Agosto de 2010 02:48 a.m. Para: Cristian Montes CC: r-help@r-project.org Asunto: Re: [R] Confidence Bands in nonlinear regression using optim and maximum likelihood Crist

Re: [R] concatenate values in the vector

2010-08-03 Thread Cristian Montes
Even shorter is x<-c("a","b","c","d") paste(x, sep="+") Cheers, Cristian Montes -Mensaje original- De: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] En nombre de Henrique Dallazuanna Enviado el: Martes, 03 de A

[R] Confidence Bands in nonlinear regression using optim and maximum likelihood

2010-08-02 Thread Cristian Montes
Hello, I am trying to plot confidence bands on the mean and prediction bands for the following nonlinear regression, using maximum likelihood via optim. A toy example with data and code of what I am trying to accomplish is: VOL<-c(0.01591475, 1.19147935 ,6.34102460, 53.68809287, 91.90143074,