turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- General Programming
- /
- Standard Error and Confidence Intervals

Topic Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-13-2018 05:17 PM

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

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to tompatmck

04-16-2018 10:52 AM

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

Paige Miller

All Replies

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to tompatmck

04-13-2018 05:24 PM

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
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to art297

04-16-2018 10:27 AM

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
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to tompatmck

04-16-2018 10:37 AM

@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

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to PaigeMiller

04-16-2018 10:47 AM

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

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to tompatmck

04-16-2018 10:52 AM

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

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to tompatmck

04-16-2018 10:46 AM

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