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 Proc Mixed

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

07-06-2015 06:05 PM

I was trying to do repeated measure ANOVA using Proc mixed to analyze a

longitudinal data. In the data, there are about 40 subjects who had been

followed at 4 different time points. A few subjects had missing data at some

time points.

My code is as following:

proc mixed;

class id time;

model dependent = a b time / ddfm=kr solution;

repeated time / subject=id type=un;

run;

* a is time-variant continuous covaraite, b is time-invariant continuous covariate;

SAS output:

effect time estimate standarderror DF tvalue P

**Intercept 3.3442 1.5310 74.2 2.18 0.0321**

**a -0.00269 0.02882 73.5 -0.09 0.9258**

**time 0 -1.0780 0.7036 76.2 -1.53 0.1296**

**time 1 -1.1664 0.5936 75.2 -1.97 0.0531**

**time 2 -0.7012 0.3935 70.6 -1.78 0.0791**

**time 3 0 . . . .**

**b 0.000704 0.000153 38.3 4.59 <.0001**

**Type 3 test fixed effects **

**Effect NuMDF DenDF F-value P**

**a 1 73.5 0.01 0.9258**

**time 3 31.8 7.87 0.0005**

**b 1 38.3 21.08 <.0001**

**from the upper panel ("solution"), the time effect is not significant. Coefficients of "time" have p-values > 0.05. But in the lower panel (type 3 test of fixed effects), time effect is significant. P of time is 0.0005. **

**I don't understand why they are not consistent. which one should I use? **

**Thank you.**

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

07-07-2015 09:42 AM

It is important to know what is being tested. In the solution panel, each level's estimate is tested against zero, whereas in the Type 3 tests, the 4 effects are tested against one another (a 3 df test). In other words, are any of the time points 0, 1, and 2 different from time point 3. You get these by adding the estimate for each time point to the intercept. The joint F test is the one that probably addresses your question--are any of the responses different by time?

Steve Denham

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

07-07-2015 12:56 PM

No conflict at all, as indicated by Steve.Each of the first three time parameters is being tested versus 0 (which means, in this, case, with an over-parameterized model: Is the expected value for each time different from the last time?). The type 3 test consists of three contrasts simultaneously. Perhaps the mean for one time is different from a different time, or the mean of the first two times is different from the mean of the second two times, and so on and so forth.