Hot answers tagged mixed-model
11
Why do coefficients and significance levels change so much in my OLS? Do I need MIXED model instead?
The fact that additional variables make large changes in your model doesn't mean there is collinearity nor does it mean it isn't "robust" (although I guess that depends on what you mean by "robust"). Nor does a reasonable VIF and a high F mean that additional variables won't have an effect. Only completely independent variables will have no effect on the ...
5
As you move from fm1 to fm2, you are actually adding 2 additional parameters, not just 1. The "(URBAN|GROUP)" syntax says not only to add both a random intercept and a random URBAN slope, but also to estimate the covariance between these two random effects, which entails an additional parameter.
To add a random intercept and a random slope, but no ...
4
I think you're specifying a great deal of random effects which are better modeled as fixed effects since you'll directly estimate the odds ratio for their association with outcome. For instance, the question of whether partisanship modifies the relationship of discount and product is simply done as a test of interaction:
m1 <- glmer(chose ~ partisanship ...
4
The lmer function requires multiple measures / random effect (at least for some of them). Furthermore, the grouping factor in the random effect is typically nominal values, not continuous. You say X2 is continuous yet you tell the model that the intercept is grouped by it as a random effect.
Either you just want straight linear modelling here or something ...
2
Q1: Yes, it is not trivial. Please check the following link http://glmm.wikidot.com/faq under the section How do I compute a coefficient of determination (R2), or an analogue, for (G)LMMs? as provides a quite good treatment of the issue; small 3-4 liners of code are presented that calculate an $R^2$ like measure.
A rather helpful reference of the subject ...
2
You can also perform a likelihood-ratio test (LRT) with mixed models. The command is also anova(model1, model2). But there are a few things you have to consider. To use the anova command after lme that has been fitted by REML (Restricted maximum likelihood; the default), the models have to include the same fixed effects and both have to be fitted via REML. ...
2
If you look at the help for predict.lme you will see that it has a level argument that determines which level to make the predictions at. The default is the highest or innermost which means that if you don't specify the level then it is trying to predict at the subject level. If you specify level=0 as part of your first predict call (without subject) then ...
1
You can use a likelihood ratio test (LRT) to test whether a random effect is significant. First, fit the random effects model. Then fit the model without the random effect. Extract and store the log-likelihood for each model using logLik and calculate the twice difference between the log-likelhood of the mixed effects model and the normal model. Use a ...
1
You calculate the full transformed confidence interval and then transform it back.
Let's say the transformed confidence interval is 5 ± 3, or CI95% = [2, 8]. You would take the 2, and 8 values and transform them back. You do NOT transform the 3 (the width of the confidence interval). The result in this example CI95% = [0.25, 0.016].
Be careful of ...
1
This is a really fun question! :D I don't know about the quantile part, I am sure that if you think about it a bit you'll come to that conclusion yourself regarding MANOVA and MLMVE.
To give you some pointers:
Treat ANOVA as synonymous to regression (ANOVA is regression after all).
Think of a MANOVA as a fully nested non-crossed two-level hierarchical ...
1
There is a very pedagogical paper on models with heterogeneous variance by Donald Hedeker and
Robin J. Mermelstein.
You can find it here:
http://www.uic.edu/classes/bstt/bstt513/Hedeker_Mermelstein_07.pdf.
They report separate ICC:s for different groups. Have look at how they have done.
1
It makes perfect sense for model 2 to be better. I didn't even have to look at the AIC. Look at the variance of your random effects. model1 and model3 are barely hanging to have impact as high as your residuals variance (measurement error if you like) and model2 has higher variance. It is a no-brainer. Also check out the correlation between your intercept ...
1
Preface
There is a discrepancy in your output. You do not allow $TL$ slope to vary according to the output for model 2, which could explain the difference in AIC if that additional error term doesn't account for much of the variation in the data.
Title
To answer the question in your title (which appears to be somewhat of a mismatch to the rest of what you ...
Only top voted, non community-wiki answers of a minimum length are eligible
