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;
The results for the fixed effect are:
|Solution for Fixed Effects|
|DF||t Value||Pr > |t||
|Type 3 Tests of Fixed Effects|
|Effect||Num DF||Den DF||F Value||Pr > F|
Then, I used JMP's interface to generate the following code:
Y( :Y ),
Effects( :Condition ),
Random Effects( :Sub, :Stimuli[:Condition] ),
NoBounds( 0 ),
Personality( "Mixed Model" ),
Run( Repeated Effects Covariance Parameter Estimates( 0 ) )
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,
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.
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.
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.
Thank you so much. I used the third method you suggested, and it works!!! Thank you so much.
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.
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".