cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
laughtpp
Level I

SAS PROC MIXED and JMP Output are Different

Dear All,

I am trying to compare the results of SAS PROC Mixed and JMP mixed model. I thought the results would be the same, but they are not. I hope JMP can give the same results of SAS PROC MIXED. Could anyone help me with it?

My SAS code as following:

PROC MIXED DATA = DATA;

CLASS Sub Condition Stimuli;

MODEL Y = Condition / SOLUTION;

RANDOM Sub;

RANDOM Stimuli(Condition);

run;

The results for the fixed effect are:

Solution for Fixed Effects
EffectConditionEstimateStandard
Error
DFt ValuePr > |t|
Intercept 4.44441.094344.060.0153
ConditionA1.11111.547640.720.5125
ConditionB0....
Type 3 Tests of Fixed Effects
EffectNum DFDen DFF ValuePr > F
Condition140.520.5125

Then, I used JMP's interface to generate the following code:

Fit Model(

  Y( :Y ),

  Effects( :Condition ),

  Random Effects( :Sub, :Stimuli[:Condition] ),

  NoBounds( 0 ),

  Personality( "Mixed Model" ),

  Run( Repeated Effects Covariance Parameter Estimates( 0 ) )

)

I got:

12760_pastedImage_1.png

12761_pastedImage_5.png

It seems like Type 3 test of fixed effects are the same in JMP and SAS, but my fixed effects parameter estimates are totally different. I am wondering if there is anyone know how could i code the JMP to make it is the same results as SAS.

Thank you all so much,

Alicia

6 REPLIES 6
ron_horne
Super User (Alumni)

Re: SAS PROC MIXED and JMP Output are Different

HI laughtpp​,

since pvalues are the same i would guess the analysis is the same. therefore, the difference is due to JMP estimation of parameters based on a different approach to contrasts of categories. check out the difference in the definition of contrasts between nominal and ordinal variables.

follow this link http://www.jmp.com/support/help/The_Factor_Models.shtml

and look for nominal factors. the table gives an explanation for how the parameters are treated.

Ron

laughtpp
Level I

Re: SAS PROC MIXED and JMP Output are Different

Hey Ron,

Thank you so much. I think you are right about the way SAS and JMP deal with contrast of nominal data differently. I am wondering if you know anyway I can change JMP's default of contrast? I think SAS's results look more reasonable for me (std error are all the same in fixed effects factors in JMP), so I would like to change the JMP's default of contrast. The reason I really want both of them match is because I want to use the beta estimate value of the fixed effects factors to calculate the R^2 of model. If the beta values are not the same, the R^2 would be different. I really appreciate your help.

Sincerely,

Alicia

ron_horne
Super User (Alumni)

Re: SAS PROC MIXED and JMP Output are Different

laughtpp

Three things to try:

1) In other cases I would change the categorical variable from nominal to ordinal modeling type. yet, in this case i think the model platform will not accept it.

2) Try to see if you can perform custom tests for thees parameters in order to "reveal" the contrasts you are looking for.

3) If it is just two categories try to see what you get by coding the categories as zeros and ones and run it as a continuous.

Ron

laughtpp
Level I

Re: SAS PROC MIXED and JMP Output are Different

Hey Ron,

Thank you so much. I used the third method you suggested, and it works!!! Thank you so much.

Best,

Alicia

ron_horne
Super User (Alumni)

Re: SAS PROC MIXED and JMP Output are Different

Hey Alicia,

I am glad it worked out for you. the last method is more of a hack or plumbers trick but it is true to the fundamentals. in the past, it was the actual way to enter categorical variables into regression models. one would build the contrasts himself by recoding the categories into n-1 new columns of zeros and ones. the program would just think they were continuous for estimation purposes.

Best,

Ron

MRB3855
Super User

Re: SAS PROC MIXED and JMP Output are Different

Hey Ron, Alicia: An easier way still may be choosing "Indicator Parameterization Estimates" in the "Estimates" Submenu (red triangle at top of analyses after clicking on "Run") of the Fit Model platform. You can also choose to display these estimates by default (in addition to the JMP default) in the "Fit Least Squares" platform in "Preferences".

 

Mark