Standard Error and Confidence Intervals

Accepted Solution Solved
Reply
New Contributor
Posts: 3
Accepted Solution

Standard Error and Confidence Intervals

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
Solution
‎04-16-2018 11:43 AM
Respected Advisor
Posts: 3,066

Re: Standard Error and Confidence Intervals

Posted in reply to tompatmck

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

View solution in original post


All Replies
PROC Star
Posts: 8,169

Re: Standard Error and Confidence Intervals

Posted in reply to tompatmck

Post some example data (in the form of a datastep) and the proc glm that you ran.

 

Art, CEO, AnalystFinder.com

 

New Contributor
Posts: 3

Re: Standard Error and Confidence Intervals

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

Respected Advisor
Posts: 3,066

Re: Standard Error and Confidence Intervals

Posted in reply to tompatmck

@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
New Contributor
Posts: 3

Re: Standard Error and Confidence Intervals

Posted in reply to PaigeMiller

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;

Solution
‎04-16-2018 11:43 AM
Respected Advisor
Posts: 3,066

Re: Standard Error and Confidence Intervals

Posted in reply to tompatmck

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
PROC Star
Posts: 8,169

Re: Standard Error and Confidence Intervals

Posted in reply to tompatmck

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

 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 153 views
  • 0 likes
  • 3 in conversation