- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm wondering why the standard errors (lsmeans/stderr) for proc glm are the same for means of different groups. The confidence limits (lsmeans/CL) are equal as well. In other statistical programs it seems that the errors are different for each group. Does it have something to do with how the variance is pooled?
Thanks.
Tom
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
So equal number of observations in each cell will produce equal stadnard errors in each cell.
You may have done a log transformation, but your GLM code doesn't use the log-data.
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Post some example data (in the form of a datastep) and the proc glm that you ran.
Art, CEO, AnalystFinder.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Thanks for the reply.
I have a randomized complete block design with treatment as a fixed effect and block as a random effect. There are 4 levels of treatment and 4 levels of block.
proc glm;
class block treatment;
model biomass = block treatment;
random block;
lsmeans treatment/stderr cl;
run;
quit;
The standard error for the lsmean is the same for all levels of the treatment effect. Also the confidence limits are equal for each treatment level.
Any more insight would be appreciated.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@art297 clearly requested that you "Post some example data (in the form of a datastep)". I don't see the data.
If the number of observations is the same in each group (and other assumptions are met), you could get standard errors that are the same for each group.
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Sorry about that. The design is balanced so there are equal reps in each treatment. I natural log transformed the data to meet assumptions. Here is some data and the code:
options formdlim = '-';
data GH_AC2015;
input Blk$ Pot$ Species$ Treatment$ Biomass Rootbiomass;
biot=LOG(Biomass);
roott=LOG(Rootbiomass);
cards;
1 6 AC Oven 0.2718 0.0703
1 7 AC Sterile 0.087 0.0459
1 13 AC Control 0.2551 0.0583
1 14 AC Rescue 0.117 0.0493
2 21 AC Sterile 0.072 0.0658
2 24 AC Control 0.1514 0.0413
2 26 AC Rescue 0.207 0.0398
2 29 AC Oven 0.1304 0.0485
3 33 AC Control 0.087 0.0204
3 38 AC Rescue 0.2012 0.0576
3 41 AC Sterile 0.0191 0.0196
3 44 AC Oven 0.1434 0.0797
4 52 AC Oven 0.2601 0.0976
4 55 AC Control 0.3554 0.0791
4 59 AC Rescue 0.2981 0.0652
4 64 AC Sterile 0.0834 0.0975
;
proc glm ;
class blk treatment ;
model biomass = blk treatment;
random blk;
lsmeans treatment/stderr cl adjust = tukey;
run;
quit;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
So equal number of observations in each cell will produce equal stadnard errors in each cell.
You may have done a log transformation, but your GLM code doesn't use the log-data.
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
In addition to what @PaigeMiller said, you may want to take a look at https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_glm_sect037...
PROC GLM may not be the proc that you want to be using for your model.
Art, CEO, AnalystFinder.com