[R] Nested and repeated effects together?

From: Stephan Kolassa <Stephan.Kolassa_at_gmx.de>
Date: Mon 05 Jun 2006 - 06:10:00 EST

Dear R people,

I am having a problem with modeling the following SAS code in R:

Class ID Gr Hemi Region Gender
Model Y = Gr Region Hemi Gender Gr*Hemi Gr*Region Hemi*Region Gender*Region Gender*Hemi Gr*Hemi*Region Gender*Hemi*Region Gr*Gender*Hemi*Region
Random Intercept Region Hemi /Subject = ID (Gr Gender)

I.e., ID is a random effect nested in Gr and Gender, leading to ID-specific Intercept, Region and Hemi means. We have repeated measurements within each ID (one measurement each for the different combinations of Hemi and Region, i.e. 2 levels in Hemi: L vs. R; 4 levels in Region: F vs. C vs. T vs. PO).

I have been trying things like



and do get results, but I am very unsure whether this implements the right model. An Error term like

    Error((1+Region+Hemi)/(ID_Vp/(Gender+Gr))), data=daten))

in the above model looks intuitively better to me, but (1) again: I'm unsure about this, (2) this crashes my R.

Of course, I have been googling for all permutations of "Nested effects", "repeated effects", "random effects" and digging through the R-help archives, but I can't seem to locate a similar question having been answered before.

Thank you all for your time!

Best regards,

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Mon Jun 05 07:24:12 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 07 Jun 2006 - 12:10:31 EST.

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