Hi all,
please help me to come out from this problem!
i have one table need to develop, on that table i have to use Anova procedure to display (adjusted mean, SE of Adj mean, diff of adj mean , SE of adj mean, 95% CI of adj diff and p-value).
i am getting results for ajusted mean, SE of adj mean, diff of adj mean and 95%CI values but i am not getting values for SE of adj mean & diff of p-values?
so how can i get those results by using ANOVA??
Code:
proc glm data=datasetname;
class subject visit trt covar1 covar2 covar3 covar4;
model value=trt visit trt*visit covar1 covar2 covar3 covar4;
estimate "Plac Vs study" trt 1 -1;
lsmeans trt*visit/ pdiff tdiff CL alpha=0.05 stderr;
run;
please help me out!
Thanks in advance.
Add the following to your code:
ods output lsmeans=lsmeans lsmeandiffcl=diffs;
The datasets from this will include an estimate (adjusted mean for the lsmeans dataset, difference in adjusted means for the diffs dataset), standard errors of those estimates, and since you specified the CL option on the LSMEANS statement, 95% confidence bounds for the estimates.
If this does not give you what you need, consider using PROC GLIMMIX, as it can handle standard ANOVA and still produce a variety of outputs that seem more straightforward (at least to me).
Steve Denham
i used ods output statment but no use ..
i will try proc glimmix and let you know what happend.
but my doubt is we have a right to use proc GLIMMIX instead of ANOVA? Both are same or yeilds diff resutls.. how can i prove we can use GLIMMIX instead of Proc glm with my team/sponsor?
Could you suggest!!
Hima
PROC GLIMMIX and PROC GLM will give the same results for simple designs, while for more complex designs GLIMMIX will give correct values (especially for standard errors of the lsmeans) that GLM will not. It is as if you have to race across a lake--you may choose a raft (ANOVA/GLM) or a speedboat (GLIMMIX). Both are capable of getting you there, but you have to be very sure of a lot of things for the raft (ANOVA) to work out. And you have to have some experience to make the speedboat work (GLIMMIX).
Consider this code for your data:
proc glimmix data=datasetname;
class subject visit trt covar1 covar2 covar3 covar4;
model value=trt visit trt*visit covar1 covar2 covar3 covar4;
random visit/residual subject=subject /* a type= option would be appropriate here to model the correlation of value from visit to visit */;
lsmestimate trt "Plac Vs study"1 -1;
lsmeans trt*visit/diff CL alpha=0.05;
ods output lsmeans=lsmeans diffs=diffs lsmestimate=lsmestimate;
run;
Steve Denham
Hi SteveDenham,
Please see this path and please give me the solution.
https://communities.sas.com/message/249713#249713
Thanks in advance.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.