I would like to generate a table with Lsmeans, SEM, and the P-value for a Proc GLM used for an experiment with 4 treatments. I am not sure what syntax to use.
Start by sharing your current code for Proc GLM.
Then tell which variables/effects you want LSMEANS output for and which specific P-values. The procedure can create multiple p-values depending on requests.
If this is to be a single "table" then likely that means creating output data set(s) and combining and selecting.
Thanks for getting back to me!
The experimental design has 4 increased doses of a supplement (0, 5, 10, and 20%) in poultry with 10 animals/pen and 5 pens/treatment.
Here the syntax I used:
proc GLM;
Class Pen TRT Sex;
Model par1 par2 par3 par4 =TRT;
lsmeans TRT/ pdiff;
means SHB / t lines;
run;
proc GLM;
Model par1 par2 par3 par4 =TRT TRT*TRT;
Run;
I am interested in having a table such this:
| Parameter | Lsmean TRT | SEM | P-value | Linear | Quadratic | |||
| 0 | 5 | 10 | 20 | |||||
| par1 | ||||||||
| par2 | ||||||||
| par3 | ||||||||
| par4 |
Thanks!
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
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.