Questions tagged [lme4-nlme]

Questions connected to R packages lme4 and nlme for linear, generalized linear and nonlinear mixed effects models. For general questions about mixed models use [mixed-model] tag.

Filter by
Sorted by
Tagged with
1
vote
1answer
9 views

Explaining Fixed and Random Effects

Let's say that I am trying to predict the Sepal Length in Iris data from Sepal Width, ...
0
votes
1answer
21 views

How to correctly use lmer for mixed-effects model?

I have data of an experiment where subjects (ID) have to perform 10 trials of a go/no-go task. I want to study the influence of ...
0
votes
0answers
17 views

R: Why does gamm4 reduce the AUC compared to lme4?

Problem: I'm currently working on binary classification with R. I found that gamm4() from gamm4 package would give worse results than ...
1
vote
0answers
41 views

Can this model be implemented with lme4?

Suppose the data $y_{ijk}$ is structured with three indexes $i,j$ and $k$, and can be decomposed through a linear mixed-effects model: $y_{ijk}=a + b_i + \xi_j+ \eta_k + \gamma_{jk} + \epsilon_{ijk}$ ...
0
votes
1answer
16 views

Glmer: output of model when scaling a continuous dependent variable

I'm exploring the use of generalized linear mixed effects models with lme4's glmer function and I have a question regarding the scaling of independent (continuous) ...
2
votes
1answer
31 views

How to run mixed effects models with lots of 0's

I have ecological data (transects as the unit) from inside marine reserves and matched control transects that I would like to test the difference across 18 separate response variables. These are 3 ...
4
votes
0answers
81 views

Is this a random or a fixed effect?

I have a question about one of the variables in my study and whether or not it should be considered a random effect. I'm conducting a study of my school's 24 general learning outcomes (or "skills".) ...
0
votes
1answer
18 views

How can I adress problems of heteroscedasticity in mixed model analysis?

I am analizing pupil size data using mixed model analysis in R. I use lme() from package nlme. However, I am encountering serious problems of heteroscedasticity and ...
2
votes
0answers
23 views

Random effects for mutually inclusive grouping factors

I am trying to fit a model on a set of data (e.g. 10,000 observations with 20 explanatory variables). The observations belong to 30 groups, G1, G2, G3, ... G30, so I need to account for the grouping ...
1
vote
1answer
38 views

Overfitting model or issue of categorical predictors?

Is it possible to overfit a model by virtue of having too many categorical variables? I have 3 categorical variables and my dependent measure is continuous (or a ratio I guess, I'm measuring ...
1
vote
1answer
19 views

Regression with paired, repeated measures design

I have a large population of books. Each book is either a hardback or softback (thus hardback and softback books are paired with one another by title), and can fall into two categorical genres - ...
1
vote
0answers
23 views

what is the model for all random effects multilevel nested anova in lmer()? [closed]

Is it lmer(y ~ 1 + (1|a/b/c) or lmer(y ~(a + (1|a/b/c))? The first input gives a blank output for ANOVA and I try to get an ...
0
votes
1answer
26 views

Is an offset term necessary for a count model of a behavior where subjects determine trial length?

We are modeling data from a behavioral study in which subject pairs' conversations are coded for specific types of utterances (say "Type A"). Subjects decide when their trial is over and we count Type ...
0
votes
1answer
27 views

How to report orthogonal contrast codes?

In my linear mixed effects model, I had a significant interaction, I followed up the interaction with orthogonal contrast codes to see where the difference was. How do I report my findings, other ...
0
votes
0answers
44 views

Multiple Nested Random Effects affecting a Mixed Model

I have a quite complex psychophysiological data dependant of different nested data in a repeated measures experiment. The first nested structure comes from the data collection were there are several ...
1
vote
1answer
29 views

Feasibility of running mixed-effects poisson/logistic regression with correlation structure such as AR(1), Toeplitz

I'm not aware of any R package that lets me use specify the covariance pattern model such as in the package nlme and run the mixed effects poisson/logistic ...
2
votes
1answer
68 views

Comparing models: which model to choose?

I'm new to mixed effects modeling, so I need help understanding when it's appropriate to choose a model. So far I've been incrementally building my modeling with main effects and then adding in the ...
1
vote
2answers
25 views

How to estimate proportions of variance in outcome variable attributable to each individual fixed effect variable in lmer?

I am using multivariate models in lme4 to try to work out, quantify and compare the effects on a single outcome variable of a large group of fixed effects variables. Because the data are at week and ...
0
votes
0answers
8 views

Convergence warning in LME4 despite p~=0.05 via ANCOVA? [migrated]

I’m having trouble with convergence warnings using lme4. I'm collecting time-series data. The outcome measure ("TCV") is derived from electromyography. I run repeated measures tests on the same ...
2
votes
2answers
25 views

linear mixed model - post hoc tests for categorical variables against fixed value null-hypothesis

I'm fitting an LME (with lmer in R) with one categorical variable that has many (80) different values. A fitting example for my problem would be how weight loss ...
1
vote
1answer
49 views

Random effect estimates for factor levels that don't exist

I am modeling the effect of race on test scores and would like to use a mixed or nested linear model to obtain estimates of the interaction between race and the school a student attends. I have ...
-1
votes
2answers
32 views

Applying linear mixed model for RNA-Seq data

We have an RNA-Seq data set from mouse with three conditions in triplicates. For better understanding of the reaction, each of the animal was weighted and its urea levels were measured beforehand. We ...
1
vote
1answer
20 views

How to set up my partial cross classification model in lme4 [closed]

I have a dataset with 300 individuals $i$ that provided ratings on objects $o$ that are $y_{io}$. Each individual rated a random sample of 3 objects out of 20 possible objects so that I have 900 ...
2
votes
0answers
46 views

Nested Fixed-effects in a GLMER. Continuous variable nested in one level of a two-level categorical variable. Is it possible? [closed]

I am not asking for help in the coding unless that may resolve the issue. I am wondering if this is even possible from a statistics standpoint and if it is, how I go about resolving it, because all my ...
1
vote
2answers
45 views

Model simplification

I am currently looking at a linear mixed model of with the formula x ~ y * z I'm struggling with simplifying the model. When I run an ANOVA of my model it said ...
0
votes
1answer
29 views

High GLMER dispersion parameters

I am running a glmer with a random effect for count data (x) and two categorical variables (y and ...
1
vote
1answer
104 views

Do regression results change depending on whether a certain variable was manipulated within-subjects or between-subjects?

I was taught in my statistics classes that whether a variable was varied between-subjects and within-subjects made a difference in the results of significance tests. For example, with t-tests, all ...
0
votes
1answer
66 views

UPDATED: Multiple lme models or MANOVA with random effects? Problem with singular fit

hope you can help me with this issue! In my study I have 4 outcome variables which correspond to the ratings I collected for 4 different psychological dimensions (liking, comfort, approach, ...
0
votes
0answers
37 views

Variance Partitioning Coefficient to help random effect interpretation in lme4 model with both random intercepts and slopes?

I am working on a project having to do with disadvantaged families accessing support services from a charity. The structure of the data places us within a mixed model context: for the random side, we ...
0
votes
0answers
15 views

Inclusion of weights in linear mixed effects model drastically changes the random effect variance estimate in lme

I am fitting a linear mixed effects model in using lme. Currently, I am investigating two different version of the model. For both versions, I include a spatial ...
1
vote
0answers
66 views

specify random effects in lme4 [closed]

I would like to ask for your help in specifying the random effects of a model I have been working on in lme4. I have data from a field survey. The objective of the ...
0
votes
0answers
29 views

R - zero biased data, glmer.nb, properly counting confidence intervals

any suggestions how to count confidence intervals from zero biased data? I've counted generalized linear model using glmer.nb function. I have to make graph but I was told that confidence intervals ...
0
votes
1answer
48 views

Odds ratio confidence intervals and p-values suggest different conclusions in a binary logistic mixed-effects model (glmer)

I am running a generalized linear mixed-effects model in R using the glmer function of lme4. The outcome variable is trial-level accuracy in a task (incorrect trials are 0, correct trials are 1), and ...
0
votes
1answer
14 views

R contradiction between lmer and emmeans results

In order to determine how herbivorous fish biomass varies between the two study sites (Waikiki and Hanauma Bay) and experimental shelter treatments (low and high), I used lmer() with a random effect ...
0
votes
1answer
43 views

Fitting a linear mixed effects model on longitudinal data with lme4: handling missing values and dates [closed]

I'm still pretty new to linear mixed models, so any help is highly appreciated. In my experiment, a test group (gets the intervention) and a control group (does not get the intervention) are observed ...
1
vote
1answer
20 views

translate formula from glmer to glmmPQL [closed]

I want to translate this formula from glmer() (lme4 package) to glmmPQL() (MASS package). ...
1
vote
0answers
35 views

Mixed model using lmer, have I specified my model correctly?

I have experimental data that looks like this: ...
0
votes
0answers
48 views

Evaluation of variance components - mixed models

How can I evaluate if the variance components of a nonlinear mixed model make sense (assuming or not assuming treatments factor)? For instance, if I am assuming an unstructured variance-covariance ...
2
votes
1answer
32 views

Understanding ANOVA to compare Mixed Model with a GzLM

I'm having a hard time understanding how can I compare a GLM with a GLMM, knowing that I probably can't compare their AIC as glmer from lme4 probably computes the maximum likelihood differently from ...
0
votes
1answer
39 views

AME (Average Marginal Effect) for lme4::glmer using margins::margins command

I am running a logistic mixed model regression using lme4::glmer Command. I wanted to report AME (average marginal effect for my coefficients). I used the ...
1
vote
2answers
56 views

Dealing with rank deficiency when multiple regressors are inherently related / a non-binary ratio

I am running a linear mixed effects model in which three of the regressor are inherently related. For sake of conceptual example: let's say I would like to see how the relative time employees arrive ...
2
votes
2answers
93 views

ANOVA or Linear Mixed Model?

I have been running several linear mixed effects models for some data of my current project, and now I'm moving on to different data I have. I say that because I'm in a mindset to use LME, and didn't ...
0
votes
0answers
33 views

Differences between glmmadaptive Vs lme4 and glmmTMB in ICC measurement

This is my first question, so please be kind... I am currently modelling a GLMM with a binary outcome with many (500+) clusters but cluster size of 2 (by design - there can be no more than 2 per ...
1
vote
0answers
30 views

How to get confidence intervals for modeled data of lmer model in R with Bootmer function

I want to get confidence intervals around modelled data from a lmer model. I found that Bootmer is the way to go. There seem to be 3 ways to do this: 1.parametrically resampling both the “spherical” ...
1
vote
2answers
48 views

Significant interaction, inconsistent with plots/raw data

I'm analyzing experimental data and the model shows a significant treatment effect, but the raw data and graph of the effect don't seem to match it. I want to understand why. I've been looking at this ...
0
votes
0answers
27 views

Mixed effects model--nested effects?

I am confused as to how I should model data from the following experiment design: It is a within participant design so each participant does all conditions: 3 variables Block (home/random) ...
1
vote
1answer
49 views

Linear mixed effects model - I can't seem to avoid either convergence errors or messy residuals

I am attempting to run a linear mixed effects regression using the lme4qtl R package. This is a package very similar to lme4, but it allows you to specify a kinship matrix so that you can account ...
0
votes
0answers
14 views

Getting significant between effects in mediation despite low ICC

I am interested in examining between effects using lmer in a mediation model using mediation and within effects using ...
1
vote
1answer
26 views

Interactions between levels — how to interpret output?

I'm confused on how to interpret R output for interactions with multiple levels. Here's what my output looks like for my full model: ...
1
vote
0answers
45 views

Glmer Model selection [duplicate]

Bit stuck on how to choose between models. My goal is to evidence the direction of the regression slope (negative shows improvement in a metric, positive shows decline). Models ...