Re: [R] Conveting SAS Proc mixed to R code

From: RKinzer <ryank_at_nezperce.org>
Date: Fri, 15 Apr 2011 13:37:04 -0700 (PDT)

I am desperate for help and thank you to everyone providing input.

I am using lme4 for a mixed linear model, and trying to replicate a SAS analysis (see thread below).

Variables:
Dependent = logrkm; Independent = Group (Streams grouped by similarity), Treatment (3 treatments), Stream, Time (1 or 2; before treatment and after), Year (-8, -7,...7, 8; each yearly observation;negs before treatment and positive after).

Design:
Blocking by stream group results in unbalanced repeated measures with 3 treatments arranged in blocks with various numbers of observations (Streams) per treatment-block. Stream, Group, and Year are random variables and Treatment and Time are fixed effects.

I have tried the following code, but can't seem to replicate the SAS results. Please correct the model below if you see where I am wrong, I am also open to other suggestions.

m2<-lmer(logrkm~Treatment*Time+(Treatment|Stream:Group)+(1|Year),data=prototype)

Thank you.

--
View this message in context: http://r.789695.n4.nabble.com/Conveting-SAS-Proc-mixed-to-R-code-tp3450626p3452937.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Sat 16 Apr 2011 - 05:46:46 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 16 Apr 2011 - 05:50:30 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive