cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
generic_user
Level I

difference in JMP and R output

I am doing mixed method model for a continuous dependent variable and 

Fit Model(
	Y(:usg_dev_data),
	Effects(:Phase, :level, :experience),
	Random Effects(:Subject ID),
	NoBounds(1),
	Personality("Mixed Model"),
	Run(Repeated Effects Covariance Parameter Estimates(0))
)

while doing the same in R as

 

model2 <- lmer(usg_dev_data ~ Phase + level + experience + (1 | Subject_ID), data = df)

 

I am getting very different parameter estimates

 

from R

 

Fixed effects:
                Estimate Std. Error       df t value Pr(>|t|)    
(Intercept)      2.40991    0.60584 42.00000   3.978 0.000269 ***
PhaseX           1.80972    0.43405 42.00000   4.169 0.000149 ***
PhaseY           2.37500    0.35440 42.00000   6.701 3.89e-08 ***
levelMid career -0.13815    0.69689 42.00000  -0.198 0.843818    
levelSenior     -0.07185    0.68069 42.00000  -0.106 0.916436    
levelTrainee    -0.48593    0.57934 42.00000  -0.839 0.406355    
experience1      0.57938    0.57071 42.00000   1.015 0.315827    
experience2      0.86185    0.87452 42.00000   0.986 0.330013    
experience3      1.63852    0.63288 42.00000   2.589 0.013169 *  

while from JMP

generic_user_0-1714098929702.png

 

 I am unable to determine why this is so different?

1 ACCEPTED SOLUTION

Accepted Solutions
MRB3855
Super User

Re: difference in JMP and R output

Hi @generic_user  . I’m no R expert, but I think. R uses the same type of parameterization as SAS proc glm. If true, they will look very different, but the hypotheses being tested are different as well. So, they are actually equivalent wrt prediction, significance, etc. At first glance, however, they do look very different. In the JMP output, look for indicator parameters (red triangle menu) and that should match with your R output (assuming R uses the same factor ordering as JMP). Take a look at the following links to understand the differences in the output and hypotheses tested. And, FWIW, in R you also used a different df for error so that will affect p-values etc. as well. JMP uses the Kenward-Roger first order approximation method.

https://www.jmp.com/support/help/en/18.0/index.shtml#page/jmp/nominal-factors.shtml#

https://www.jmp.com/support/help/en/18.0/index.shtml#page/jmp/indicator-parameterization-estimates.s...


Edit: see this as well. https://cran.r-project.org/web/packages/SASmixed/vignettes/Usinglmer.pdf

 

 

 

View solution in original post

2 REPLIES 2
MRB3855
Super User

Re: difference in JMP and R output

Hi @generic_user  . I’m no R expert, but I think. R uses the same type of parameterization as SAS proc glm. If true, they will look very different, but the hypotheses being tested are different as well. So, they are actually equivalent wrt prediction, significance, etc. At first glance, however, they do look very different. In the JMP output, look for indicator parameters (red triangle menu) and that should match with your R output (assuming R uses the same factor ordering as JMP). Take a look at the following links to understand the differences in the output and hypotheses tested. And, FWIW, in R you also used a different df for error so that will affect p-values etc. as well. JMP uses the Kenward-Roger first order approximation method.

https://www.jmp.com/support/help/en/18.0/index.shtml#page/jmp/nominal-factors.shtml#

https://www.jmp.com/support/help/en/18.0/index.shtml#page/jmp/indicator-parameterization-estimates.s...


Edit: see this as well. https://cran.r-project.org/web/packages/SASmixed/vignettes/Usinglmer.pdf

 

 

 

generic_user
Level I

Re: difference in JMP and R output

yes thank you.

 

The indicator parameter matched with the R output.