BookmarkSubscribeRSS Feed
Nikrenzia
Calcite | Level 5

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

6 REPLIES 6
PaigeMiller
Diamond | Level 26

Naturally, it is hard to give an explanation without seeing your code and the results (hint, hint)

 

--
Paige Miller
Nikrenzia
Calcite | Level 5

 

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       
EffectLocationEstimateStandardDFt ValuePr > |t| 
Error 
LocationEK0.1470.120539.91.220.2299 
LocationPG0.11190.13541900.830.4095 
LocationTO-0.1670.1422162-1.170.2421 
Length 15.0840.121349312.44<.0001 
Age 0.16780.024955806.72<.0001 
LengthFromStadiu*Age -0.077460.01455601-5.33<.0001 
Age*LocationEK-0.10210.03355523-3.040.0025 
Age*LocationPG-0.081820.02484516-3.290.0011 
Age*LocationTO0.... 
        
Type 1 Tests of Fixed Effects   
EffectNum DFDen DFF ValuePr > F   
Location314.4348.94<.0001   
Length1424474.32<.0001   
Age145416.52<.0001   
Length*Age159720.6<.0001   
Age*Location24926.770.0013   
        
Type 3 Tests of Fixed Effects   
EffectNum DFDen DFF ValuePr > F   
Location367.51.570.2055   
Length1493154.73<.0001   
Age159744.3<.0001   
Length*Age160128.36<.0001   
Age*Location25156.770.0012   
        
Least Squares Means 
EffectLocationEstimateStandardDFt ValuePr > |t| 
Error 
LocationEK12.4160.095332413.02<.0001 
LocationPG13.0220.0731826.817.8<.0001 
LocationTO14.1020.0707212.819.94<.0001 
        
Differences of Least Squares Means
EffectLocationLocationEstimateStandardDFt ValuePr > |t|
Error
LocationEKPG-0.060650.119924.6-0.510.6175
LocationEKTO-0.16860.118618.9-1.420.1716
LocationPGTO-0.1080.101918.3-1.060.3032

 

 

 

 

PaigeMiller
Diamond | Level 26

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
Nikrenzia
Calcite | Level 5

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

 

 

PaigeMiller
Diamond | Level 26

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

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 1925 views
  • 0 likes
  • 2 in conversation