[R-sig-ME] Convert nlme formula to nlmer
Ben Bolker
bbolker at gmail.com
Sun Jun 22 21:20:00 CEST 2014
On 14-06-22 03:15 PM, Roxane Foulser-Piggott wrote:
> I posted this query to the R-help list and was advised to try this
> mailing list: R version 3.1.0 (2014-04-10) -- "Spring Dance”.
> Platform: x86_64-apple-darwin13.1.0 (64-bit).
>
> I would like to convert the following function from nlme to nlmer. I
> am finding it difficult to apply the documentation I can find on this
> procedure to this problem. The function predicts earthquake
> ground-shaking (lnIa) as a function of M, Rrup, Ztor, Fevent, Vs30
> and e1. I am converting to nlmer, as once I have it running, I will
> explore crossed and nested mixed effects.
>
> eq1 <- nlme( lnIa ~ c0 + m1*(M-5) + (r1a + r1b*M)*log(sqrt(Rrup^2 +
> Ztor^2)) + f1*Fevent + v1*log(Vs30/760) +
> e1,fixed=c0+m1+r1a+r1b+f1+v1~1,random=e1~1|Event,data = data, start =
> c(c0=11,m1=-0.9,r1a=0.5,r1b=-0.52,f1=0.9,v1=-1.32))
>
> Many thanks, Roxane.
Did you look at http://rpubs.com/bbolker/3423 yet ?
Ben Bolker
More information about the R-sig-mixed-models
mailing list