Programming the statistical procedures from SAS

lsmeans proc mixed

Reply
Occasional Contributor
Posts: 5

lsmeans proc mixed

Hi, I runed this invocation, and run very well, just I want to obtain the Tukey's results with literals and not like appear. 

data CEN; 
DO PG=1 to 2;
DO PCH= 1 to 4;
DO BLOQ=1 to 4;
INPUT Y@@;
COMPGPCH= PG*10+PCH;
output;
end;
end;
end;
DATALINES; 
9.93	10.58	9.94	10.18
10.75	9.71	10.53	10.26
.	.	.	.
10.52	10.36	10.35	10.16
12.29	12.06	12.06	11.88
12.00	12.55	12.82	12.52
12.52	11.92	11.98	11.73
12.09	11.88	11.83	11.96
;
proc mixed data=CEN method=reml; 
class pg pch bloq; 
model y= bloq pg bloq*pg pch pg*pch/ ddfm=satterth;
random bloq; 
lsmeans pg pch pg*pch/ adjust=tukey; 
run;  
PROC Star
PROC Star
Posts: 404

Re: lsmeans proc mixed

As I've suggested in another of your threads:

 

 https://communities.sas.com/t5/SAS-Statistical-Procedures/LSMEANS-LINES-option-in-PROC-GLM/m-p/46694...

 

"you really, really need to read SAS® for Mixed Models, Second Edition"

 

In GLM, random effects are included in the MODEL statement. In MIXED, random effects are not included in MODEL; instead random effects are specified in RANDOM or REPEATED statements. Even if your model runs apparently well in MIXED, your specification is not correct, and neither are the results. Mixed models are complex, and you must devote effort to learning enough to apply them correctly.

 

 

 

Ask a Question
Discussion stats
  • 1 reply
  • 111 views
  • 0 likes
  • 2 in conversation