[R-sig-ME] OR random effects - multilevel model
ccleland at optonline.net
Tue May 11 19:14:16 CEST 2010
On 5/11/2010 11:11 AM, Etn wrote:
> Hi All,
> I would really appreciate any advice on extracting Odds Ratios for random
> effects from my multilevel model. I want to find the OR for the random
> effects School and School:Student_ID......
> I have tried several approaches with no success.....
Perhaps you are looking for the median odds ratio described by Larsen
and Merlo (2005)?
If not, you may want to further explain what you mean.
hope this helps,
> Model<- lmer(Res~Gender+(1|School)+(1|School:Student_ID),
> I can extract the ORs for the fixed effects using:
> However, I cannot seem to extract for Random effects...
> The methods I have tried are:
> 1): This gives the OR for School..... but I'm unsure how to get
> Random1 = coef(Model)$School
> 2) This extracts the random effects, but I cannot exp to get OR
> Error in exp(ranef(Model)) :
> Non-numeric argument to mathematical function
> Error in ranef(Model)$School:Student_ID: NA/NaN argument
> In addition: Warning message:
> In ranef(Model)$School:Student_ID:
> numerical expression has 43159 elements: only the first used
> [[alternative HTML version deleted]]
> R-sig-mixed-models at r-project.org mailing list
Chuck Cleland, Ph.D.
NDRI, Inc. (www.ndri.org)
71 West 23rd Street, 8th floor
New York, NY 10010
tel: (212) 845-4495 (Tu, Th)
tel: (732) 512-0171 (M, W, F)
fax: (917) 438-0894
More information about the R-sig-mixed-models