5 votes

How to add interaction and covariates to linear mixed effects model in R

Fixed/Random Variable Inputs There's nothing stopping you from adding any number of variables that were measured at baseline. If this measure was also repeated, then you would need to code that into ...
Shawn Hemelstrand's user avatar
4 votes
Accepted

Cautions or considerations when setting coefficients from linear model into the fixed-effects component of a mixed effects model

Note that to estimate the random effect, you need the fixed effects and the variance components. In particular, for a random intercepts model, the formula is $$\hat{b}_i = \frac{n_i \sigma_b^2}{\sigma^...
Dimitris Rizopoulos's user avatar
3 votes

Why does centering predictors resolve non-convergence in lme4?

I doubt that centering your predictors will have much of an effect on convergence in itself. What may help in some cases is rescaling. The combination of the two operations is usually called '...
PBulls's user avatar
  • 3,658
3 votes

When analysing time series data with lme4, how do you include both a step-change and a slope-change?

Your model currently has a single fixed time parameter, which is the same for all observations. The estimate is very slightly negative, so all your predictions ...
PBulls's user avatar
  • 3,658
3 votes
Accepted

Solutions to a 'singular fit' in generalized linear mixed-effects models

Solutions Here are some common solutions to singular fits, some of which are listed in the help function listed in the error call for glmer... The most common ...
Shawn Hemelstrand's user avatar
2 votes

Modeling repeated measures data in R - Interpretation and Validation

To help make your original regression results more interpretable, I suggest that you code timepoint such that the first occasion is given a value of 0. This is because in regression models, the ...
Erik Ruzek's user avatar
  • 4,592
2 votes

Random intercept

That's a very interesting model ! I'm curious about what kind of data you are dealing with, and your research questions? Anyway in nlme you can usually just specify ...
Robert Long's user avatar
  • 59.9k
2 votes
Accepted

ANOVA, ANCOVA, linear mixed effect model

Option 1 and 2 are a no-go because your observations are clearly non-independent given the repeated measures. Option 3 looks the best to me. I prefer using lme4 for ...
Shawn Hemelstrand's user avatar
1 vote

Linear Mixed Models: Accounting an effect as a random intercept or slope

Reaction ~ Task + (1+order|Subject) says the effect of order varies by subject but on average is exactly equal to zero. That is certainly not what you intend to ...
Noah's user avatar
  • 32.4k
1 vote
Accepted

Checking for temporal autocorrelation in experience sampling data - how to interpret the variogram?

The plot indicates the semivariance initially increases with the day interval, which is typical as observations further apart in time are generally less correlated. However, it doesn't show a clear ...
Robert Long's user avatar
  • 59.9k
1 vote

Rank deficiency and interaction term not estimated

The problem is in the design; you don't really have 2x2, you have something like 2x1.5. Whenever there is high lexical complexity, there is average readability, so the interaction can't be estimated. ...
Peter Flom's user avatar
  • 117k
1 vote

Correlations Fixed Effect

Your assumption of multi-collinearity is correct, but it's not necessary for multi-collinearity that a*c and a*b are correlated ...
George Savva's user avatar
  • 2,054

Only top scored, non community-wiki answers of a minimum length are eligible