- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am running a mixed model (procedure mixed) in which a 3-factor variable is highly significat (PR>F : <.0001). However, when I run lsmeans (pdiff) and check the difference between the three factors, there is no difference between them.
Does anyone know what the reason for this result can be? The dataset is large (over 10000 observations).
Regards
/Stina
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Naturally, it is hard to give an explanation without seeing your code and the results (hint, hint)
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Ok. Here is the code and the results. I'm checking if there are differences in production between plants grown in 3 different locations. Length and Age are also important parameters.
proc mixed data = mydata;
class Location Plot Plant;
model Production = Location Length Age
/ddfm = Sat noint solution outpred = OriginalScale htype = 1,3;
random Int / subject = Plot type = un ;
random Int / subject = Plant type = un ;
lsmeans Location/ pdiff;
run;title;
Solution for Fixed Effects | |||||||
Effect | Location | Estimate | Standard | DF | t Value | Pr > |t| | |
Error | |||||||
Location | EK | 0.147 | 0.1205 | 39.9 | 1.22 | 0.2299 | |
Location | PG | 0.1119 | 0.1354 | 190 | 0.83 | 0.4095 | |
Location | TO | -0.167 | 0.1422 | 162 | -1.17 | 0.2421 | |
Length | 15.084 | 0.1213 | 493 | 12.44 | <.0001 | ||
Age | 0.1678 | 0.02495 | 580 | 6.72 | <.0001 | ||
LengthFromStadiu*Age | -0.07746 | 0.01455 | 601 | -5.33 | <.0001 | ||
Age*Location | EK | -0.1021 | 0.03355 | 523 | -3.04 | 0.0025 | |
Age*Location | PG | -0.08182 | 0.02484 | 516 | -3.29 | 0.0011 | |
Age*Location | TO | 0 | . | . | . | . | |
Type 1 Tests of Fixed Effects | |||||||
Effect | Num DF | Den DF | F Value | Pr > F | |||
Location | 3 | 14.4 | 348.94 | <.0001 | |||
Length | 1 | 424 | 474.32 | <.0001 | |||
Age | 1 | 454 | 16.52 | <.0001 | |||
Length*Age | 1 | 597 | 20.6 | <.0001 | |||
Age*Location | 2 | 492 | 6.77 | 0.0013 | |||
Type 3 Tests of Fixed Effects | |||||||
Effect | Num DF | Den DF | F Value | Pr > F | |||
Location | 3 | 67.5 | 1.57 | 0.2055 | |||
Length | 1 | 493 | 154.73 | <.0001 | |||
Age | 1 | 597 | 44.3 | <.0001 | |||
Length*Age | 1 | 601 | 28.36 | <.0001 | |||
Age*Location | 2 | 515 | 6.77 | 0.0012 | |||
Least Squares Means | |||||||
Effect | Location | Estimate | Standard | DF | t Value | Pr > |t| | |
Error | |||||||
Location | EK | 12.416 | 0.09533 | 24 | 13.02 | <.0001 | |
Location | PG | 13.022 | 0.07318 | 26.8 | 17.8 | <.0001 | |
Location | TO | 14.102 | 0.07072 | 12.8 | 19.94 | <.0001 | |
Differences of Least Squares Means | |||||||
Effect | Location | Location | Estimate | Standard | DF | t Value | Pr > |t| |
Error | |||||||
Location | EK | PG | -0.06065 | 0.1199 | 24.6 | -0.51 | 0.6175 |
Location | EK | TO | -0.1686 | 0.1186 | 18.9 | -1.42 | 0.1716 |
Location | PG | TO | -0.108 | 0.1019 | 18.3 | -1.06 | 0.3032 |
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I am running a mixed model (procedure mixed) in which a 3-factor variable is highly significat (PR>F : <.0001).
The Type III Test shows a p-value of 0.2055, which indicates no significant differences. You probably should be using the Type III Test here.
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Ok, do you have any idea why the III method is better here? I normally use Type I.
Or maybe this question is more suited for a statistical forum than a programming forum?
/Stina
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Type I assumes that the variable has been entered into the model first, and that the sequence of terms in the model is meaningful. The sequence of your model terms is arbitrary.
Type III assumes that the variable has been entered into the model last. This is more appropriate, it measures the significance of a model term assuming the effects of the other terms has already been accounted for.
More reading: http://documentation.sas.com/?cdcId=pgmmvacdc&cdcVersion=9.4&docsetId=statug&docsetTarget=statug_int...
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
/Stina