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
- /
- Analytics
- /
- Stat Procs
- /
- Estimate statement with interaction

Topic Options

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

08-15-2015 04:33 PM

Hi

Can anyone help me with the following problem:

I can't get estimates from the estimate statement and always get the message that the estimate is not estimable

A versus B for BMI <= 22 is not estimable."

proc glm data=inputdata;

class trgrp BMIgroup ;

model outcome = trgrp BMIgroup BMIgroup*trgrp /solution;

estimate "A versus B for BMI <= 22 " BMIgroup 1 0 trgrp 1 -1 BMIgroup*trgrp 1 0 -1 0 ;

run;

The variable trgrp and BMIgroup are both binary variables. I want to estimate the treatment effect in the group with the low BMI.

What am I doing wrong?

Thanks for your help.

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

08-15-2015 06:08 PM

If you want to estimate the effect of trgrp in one BMI group then do this:

proc glm data=inputdata;

class trgrp ;

model outcome = trgrp;

where bmigroup = 0;

run;

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

08-15-2015 06:38 PM

But I also want to add another estimate statement for the group >22.

I think this should be possible with the estimate statement or is it really necessary to run twice proc glm with a where statement.

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

08-15-2015 06:48 PM

You are dealing with the question of whether you want a stratified analysis (one for the low BMI group, one for the high BMI group) or a moderated model with an interaction term.

If you stratify the analysis, you could use a BY statement:

proc sort data = inputdata;

by bmigroup;

run;

proc glm data=inputdata;

class trgrp ;

model outcome = trgrp;

by bmigroup;

run;

if you want a moderated model you could run

proc glm data=inputdata;

class trgrp bmigrp ;

model outcome = trgrp bmigrp trgrp*bmigrp;

lsmeans trgrp bmigrp trgrp*bmigrp;

run;

and you could have an estimate statement as well - although I find LSMEANS easer to write and to have easier output to read.

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

08-17-2015 08:30 AM

And in this case, the use of the LSMESTIMATE statement is indicated. However, it isn't supported in GLM, so a change to PROC MIXED would be one way to get this done. Another approach would be to use the SLICE option in the LSMEANS statement.

Steve Denham