Skip to main content

Questions tagged [mixed-models]

Programming problems related to the analysis of statistical models with random-effects terms, also variously: repeated measures, hierarchical, multilevel models

mixed-models
0 votes
0 answers
3 views

How can I plot a linear mixed model in R with a regression line and confidence interval that match the data?

I am trying to plot this model: m1 <- lmer(tarsus.yc ~ BMR + MMR + Msum + (1|box), data = p2). I want one plot per predictor and use the parameter estimates from the full model for the regression ...
Marion Grange's user avatar
1 vote
0 answers
15 views

Sommer Package: mmer prediction error because of singular matrix

I am running a GxE mixed model in Sommer, with the environments as a fixed factor and genotypes as a random factor with a GRM as covariance structure (G_GY). For the interaction term, the covariance ...
set_user123's user avatar
0 votes
0 answers
13 views

Getting results output for random factors in glmer()

CONTEXT: Previously, my data fit a normal distribution and I was able to use a linear mixed effects model, lmer(), with the following format: lmer(predictor ~ response + (1 | random), data = data) I ...
Olivia Jones's user avatar
0 votes
0 answers
21 views

The emmeans error: "'x' is not positive definite" [closed]

I am now running a linear mixed effects model and want to use emmeans() to do the post-hoc tests. Here is my code: mod.cog_engagement <- lmer(scale(cog_engagement) ~ Year_ID*Group + (1 | school) + ...
Mason's user avatar
  • 1
0 votes
0 answers
20 views

How do I correctly specify nesting in the sommer R package?

I accustomed to lme4 where it would be simply: (1|genotype/root_ID) but it's unclear to me looking through the documentation the appropriate way to do this in sommer. mod1 <- mmer(Y ~ 1, ...
bigoof99's user avatar
0 votes
0 answers
14 views

Confounding Variable in Regression Model: Simpson's Paradox

I am working on a mixed effects regression model where Yi = exam score of student i. The explanatory variables are the following: Level 3: school type (public vs. private) and school's socioeconomic ...
Elena García's user avatar
0 votes
0 answers
21 views

Multinomial mixed models: glmmTMB vs. mblogit. Why does glmmTMB works and mblogit gives the 'a' is computationally singular error?

Currently, I am trying to run a multinominal mixed model with one random factor in order to analyze a dataset comprising the following variables: Demographic group: a factor with 7 groups, the ...
S_vdp's user avatar
  • 1
0 votes
1 answer
24 views

Omnibus effect size r2glmm

I have a dataframe containing four columns: ID: participants' id F1: First factor with two levels (A;B) F2: Second factor with three levels (C;D;E) Score: score on a variable Participants are ...
antvan's user avatar
  • 23
0 votes
0 answers
38 views

How to successfully create raster of predicted values from spatial logistic regression? R spaMM package

I am trying to run a spatial logistic regression model using the spaMM package in R. I have a stack of three predictor rasters representing canopy height, canopy layers, and large tree density, and am ...
user25754519's user avatar
0 votes
0 answers
8 views

Appropriate Statistical Test for pre to post data with imputed data sets?

Thank you in advance for your time and help!! I'm working with data with 70 participants that completed an intervention. Participants completed surveys before and after the intervention (so pre and ...
icecreamsundaes's user avatar
0 votes
1 answer
61 views

df = 1 for an intercept-only linear mixed model, how to fix? (R) [closed]

I'm testing the intercept of a linear mixed model regression predicting a binary variable in an intercept-only model with random intercepts for another dichotomous variable and one factor variable ...
PGJ's user avatar
  • 13
-1 votes
0 answers
16 views

Issues with 'boundary (singular) fit ' when fitting a Mixed Effect Negative Binomial model [duplicate]

I am running a linear mixed models for a study about scRNAseq with the variable leiden( meaning different clusters) as a random variable. The thing is that I got what is called 'boundary (singular) ...
karlie022's user avatar
0 votes
1 answer
31 views

Mixed-effects models: Does lmer function really do listwise deletion?

I read that the default setting of lme4 is listwise deletion. My data is in long format (repeated measures with two time points) and it doesn't appear that it really deletes listwise (as I understand ...
FabRic's user avatar
  • 1
0 votes
0 answers
10 views

Difficulty in adapting the GRM when fitting a Bayesian Regression across environments using BGLR package in R

I am working on a study that consists of multiple plots (i.e. environments) on which different wheat varieties are grown. It is an unbalanced design, so not each variety grows on each plot. A genomic ...
set_user123's user avatar
0 votes
0 answers
21 views

Linear mixed model. Model creation and how to plot results from mixed models?

I am new using linear mixed model. This is my problem. I have a dataset containing multiple echocardiography measuerement per patient over time. Some individuals have two echoes and some of them have ...
cindy porras's user avatar

15 30 50 per page
1
2 3 4 5
96