Hello, I am interested in fitting a random intercept linear mixed model to my data. My response variable is Spike_prob, my predictor is gen and grouping variable is animal. Here is the formula I use:
lme = fitlme(data,'Spike_prob~1+gen+(1|animal)')
Linear mixed-effects model fit by ML
Model information:
Number of observations 209
Fixed effects coefficients 2
Random effects coefficients 13
Covariance parameters 2
Formula:
Spike_prob ~ 1 + gen + (1 | animal)
Model fit statistics:
AIC BIC LogLikelihood Deviance
-225.27 -211.91 116.64 -233.27
Fixed effects coefficients (95
Name Estimate SE tStat DF
'(Intercept)' 0.22942 0.014438 15.89 207
'gen' -0.061785 0.019297 -3.2019 207
pValue Lower Upper
1.0669e-37 0.20096 0.25788
0.0015807 -0.099828 -0.023742
Random effects covariance parameters (95
Group: animal (13 Levels)
Name1 Name2 Type Estimate Lower
'(Intercept)' '(Intercept)' 'std' 0 NaN
Upper
NaN
Group: Error
Name Estimate Lower Upper
'Res Std' 0.13848 0.12582 0.15242
Why do I get the exact same p and DF values when I do not include the random intercept term?
lme = fitlme(data,'Spike_prob~1+gen')
lme =
Linear mixed-effects model fit by ML
Model information:
Number of observations 209
Fixed effects coefficients 2
Random effects coefficients 0
Covariance parameters 1
Formula:
Spike_prob ~ 1 + gen
Model fit statistics:
AIC BIC LogLikelihood Deviance
-227.27 -217.25 116.64 -233.27
Fixed effects coefficients (95
Name Estimate SE tStat DF
'(Intercept)' 0.22942 0.014438 15.89 207
'gen' -0.061785 0.019297 -3.2019 207
pValue Lower Upper
1.0669e-37 0.20096 0.25788
0.0015807 -0.099828 -0.023742
Random effects covariance parameters (95
Group: Error
Name Estimate Lower Upper
'Res Std' 0.13848 0.12582 0.15242