Re: [R] HLM Model

2011-01-31 Thread Belle
Hi Silvano: Could you tell me what "correlation=corSymm(form = ~ 1 |id)" represents? In our case, team is random effect, trt, pairs, grade, school are fixed effect, and each team is within school. I still got the different results from both SAS and R. > unstruct <- gls(score~trt+pairs+grade+s

Re: [R] HLM Model

2011-01-28 Thread Silvano
Hi Belle, try this: SAS: proc mixed data=test noclprint noinfo covtest noitprint method=reml; class pair grade team school; model score = trt pair grade school / solution ddfm=bw notest; random int / sub=team solution type=un r; run; R: require(nlme) unstruct <- gls(score~trt+pair+grade+sc

Re: [R] HLM Model

2011-01-27 Thread Jeremy Miles
The empirical statement on the proc mixed line gives you robust standard errors, I don't think you get them in R. In SAS you specify that the predictors are to be dummy coded using the class . Are they factors in R? I can't tell from the SAS output, because the formatting has been lost. However

Re: [R] HLM Model

2011-01-27 Thread Belle
Hi Harold: I know the outputs are different between SAS and R, but the results that I got have big difference. Here is part of the result based on the SAS code I provided earlier: Cov Parm SubjectEstimate Error Value Pr > Z

Re: [R] HLM Model

2011-01-27 Thread Doran, Harold
t.org] On > Behalf Of Belle > Sent: Thursday, January 27, 2011 3:54 PM > To: r-help@r-project.org > Subject: Re: [R] HLM Model > > > Hi Harold: > > Yes, this was the R code that I tried, and got different result from SAS. > > Is that mean I cannot actually use R to

Re: [R] HLM Model

2011-01-27 Thread Belle
Hi Harold: Yes, this was the R code that I tried, and got different result from SAS. Is that mean I cannot actually use R to run unstructured covariance matrix? How can I solve this problem if I need an unstructured covariance matrix method? Thanks for the help. -- View this message in contex

Re: [R] HLM Model

2011-01-27 Thread Doran, Harold
I think it should be fm <- lmer(score ~ trt + pair + grade + school + (1|team), test) The unstructured covariance matrix you use in proc mixed is not available in Rs function for mixed models > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]