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
- /
- help with "estimate" statement in Proc glimmix

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

03-27-2014 04:22 PM

I am trying to build a linear mixed effect model assuming both random intercept and random slope. The data is like this: There are 3 groups (1 ,2 ,3) and 15 subjects in group 1, 8 subjects in group 2, 8 subjects in group 3. Each patient has been measured 3 times (time: 0, 1, 2). The outcome is continuous. so I assumed normal distribution and identity link function.

I wrote code like this:

proc glimmix data=xxx;

class group time;

model outcome = group time group*time / dist=normal link=identity;

random intercept time / subject=id type=un;

estimate "group 1 - group 2 at time 0" ....................

"group 1 - group 3 at time 0"....................

"group 2 - group 3 at time 0".................../ adjust=t;

run;

After I ran the model, I found the interaction term "group*time" is significant. So I want to estimate the differences between groups at time 0 and adjust p-values by tukey. But I am not sure how to specify the values of fixed effect and random effect in the "estimate" statement. can anyone help with this?

In addition, if I specify time as linear instead of categorical variable, would it change the way how we specify the values of fixed effect and random effect?

Thanks.

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

03-28-2014 09:19 AM

I think you will want to approach this slightly differently. Since your data are Gaussian, I would model the repeated nature of the design as an R side effect, rather than a G side. This will make the "random" effect of time more easily handled in lsmeans. I would use the LSMESTIMATE statement in GLIMMIX for the comparisons. Thus, the code would look something like:

proc glimmix data=xxx;

class group time id;

model outcome = group time group*time / dist=normal link=identity;

random time /residual subject=id type=un;/*This fits an R side repeated structure*/

lsmestimate group*time "group 1 - group 2 at time 0" 1 0 0 -1 0 0 0 0 0,

"group 1 - group 3 at time 0" 1 0 0 0 0 0 -1 0 0,

"group 2 - group 3 at time 0" 0 0 0 1 0 0 -1 0 0/ adjust=t elsm;/*The elsm option prints the **K **matrix. Check it to make sure the comparisons I have here match your set-up */

run;

Of course, additional lsmestimate entries, or blocks, can be entered, depending on how you want to adjust your p values.

Steve Denham

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

03-28-2014 10:53 PM

Just a note. ADJUST=T is not shorthand for ADJUST=TUKEY. ADJUST=T calls for t-tests with no adjustment. ADJUST=TUKEY is not available for LSMeans differences. The choice of adjustment methods for LSMeans differences in GLIMMIX is quite limited.

PG

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

03-30-2014 12:59 PM

Actually, adjust=tukey is valid in GLIMMIX. There are many possible adjustments. Check the User's Guide.

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

03-30-2014 01:03 PM

Oops. adjust=tukey IS available with the lsmeans statement (for pairwise differences). However, it is NOT available for estimate or lsmestimate statements. Sorry for confusion.

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

03-31-2014 07:49 AM

So, the answer (if someone really wants Tukey's adjustment) would be to use the STORE statement, and follow with PROC PLM, which has the full array of adjustment methods.

OTOH, perhaps using one of the available methods such as adjust=simulate would provide better coverage.

Steve Denham