Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

2
votes
2answers
58 views

Why are my random effects not identified, even when I have repeated measures

I want to evaluate the effect of number of flowers (fixed effect) and soil nutritional content (fixed effect) on size of flower. The experimental design consists in 16 plants growing on two substrates ...
0
votes
1answer
34 views

Why does AIC model rank order change in lme models with standardization of predictor variables?

I can't figure this out. The AIC/AICc rank of my mixed effect models are different whether or not I standardize my predictor values using rescale. Note, I'm not concerned that AICc is changing, as ...
0
votes
1answer
47 views

Non significant intercept but significant coefficients in mixed effect modelling

I am using mixed effect models to predict a time series of data. I am using lmertest() in R to overload lmer() to gain p values via Satterthwaite approximation. The general model for each formula in R ...
0
votes
1answer
27 views

Interpret contradicting output of lmer model with categorical interaction in R

I am struggling to interpret my output in R. It does not make sense to me. I first regressed participants' ratings (= value) on manipulations (...
2
votes
3answers
57 views

Is a specific mixed model within the class of models generated by lme4?

Given $i = 1, ..., n$ people, we measure a continuous response $y$, a group $g = 1, ..., G$ and a class $c = 1,2$. All members ...
0
votes
0answers
37 views

Lme4 glmer equation write up [on hold]

I wonder if the write up for glmer would be different than for lmer from lme4 package (this ...
0
votes
1answer
26 views

glmer: Model failed to converge

My model is a three level MLM with dichotomous outcome using lme4::glmer (projects nested in Categories and then nested in Years): ...
6
votes
1answer
61 views

Is it appropriate to estimate a random slope without estimating the overall mean slope?

I am trying to estimate whether there are differences in how individuals in different cities (my grouping variable) respond to a few predictor variables. So, in practice, I am interested in learning ...
0
votes
0answers
12 views

Comparing coefficients at different levels of multilevel model

I have a 2 level model with a related measure for both level (specifically I have people at level 1 and groups of people at level 2). ...
1
vote
0answers
49 views

lme4 mixed model unbalanced error factors + singular fit

I am studying the effects of 5 treatments (CT,CCM,CCI,F, S) on grape yield. My experimental design consists in: 5 treatments and 2 farms (SG, MT) which I use as block. I created an additional ...
0
votes
1answer
39 views

glmm models - predictions and results presentation

I'm working with GLMM and a binomial distribution to find the best model for my biological data. I'm currently writing my PhD and I have some trouble to present my results. I read and learn a lot ...
0
votes
0answers
25 views

LMM with several random effects -> R results in a boundary (singular) fit error [duplicate]

I have a data set including (fish) egg volume, Treatments, adult male length, adult female length and the location where parental fish were caught. I first made the mistake and introduced the ...
1
vote
0answers
42 views

Inexplicable bad estimation in a Poisson regression (GLMM)

I need to use a Poisson regression to obtain the equivalent of a piecewise exponential estimation for the survival curve. So far so good. The problem occurs when I add a covariate to my time variable....
5
votes
1answer
53 views
0
votes
0answers
8 views

Error when averaging GLM models using `model.avg()` from package `MuMIn`

I already asked this question on the R forum but had no answers, so my guess is that it is better to ask here. I'm analysing some data using glmer(). Please bear ...
1
vote
1answer
41 views

Linear Mixed Effects Models for Truncated Normal Distribution

I would like to analyze amplitude differences of discrete oscillations that were detected in a time-series using a thresholding method between three different conditions. The number of discrete events ...
1
vote
1answer
28 views

Zero random intercept variance for glmer mixed model

I'm running the following glmer model in lme4: ...
1
vote
0answers
50 views

R: lme4 vs. glmmTMB for binomial GLMM

I am fitting a GLMM to test if parasite prevalence in snails (positive snails divided by total snails) differs between different sites (site_type). Sites were ...
1
vote
1answer
22 views

Why would the following two specifications of linear mixed model give different SE and variance components estimates?

Take the "Orthodont" dataset from "nlme" for an example. Let's say we want to fit a linear mixed effect model "distance ~ age + random intercept + random slope for age". It seems to me that the ...
0
votes
0answers
12 views

Creating a Rasch score-to-measure table in lme4

I'm interested in creating a score-to-measure table, like this, except using lmer in lme4 instead of Winsteps. I am modeling child ability using dichotomous survey responses. My model includes the ...
0
votes
0answers
13 views

Interpreting coefficients of an ordinal logistic mixed model

I fitted a ordinal logistic regression model of the form mod <- polr(myResponse ~ Academic_YearCode + GenderCode, Hess = TRUE, data = dat) ...
2
votes
1answer
31 views

Random effect variance differs between glmer() and lmer() function

I'm studying the difference of feed intake between more than 150 horses. From each horse we have their feed intake at different week points. My data is not normal-distributed. Therefore, in order to ...
1
vote
1answer
77 views

Mixed Effect Models - choice of the random intercept

I'm using the glmer function from lme4 package to model a binomial phenomena in a human DNA dataset. An allele can be missing (1) or not (0). The dataset is created with 10 different samples. Each ...
0
votes
1answer
185 views

Singular fit error caused by random factor

I'm trying to fit a generalised mixed model for some embryo data and I am getting the error for singular fit. my model is ...
0
votes
1answer
101 views

Dealing with heteroscedasticity and non-normality in a mixed model

I am trying to fit a mixed model (person as random effect) on data which has heteroscedasticity and non-normality. I log-transformed the Y-variable but it did not fix the problem. Normality and ...
0
votes
0answers
10 views

Model comparison with new IV over data subset: to rebuild base model or not

I'm modeling a few DVs with a set of IVs via glmer. I have successfully built a drop-1 nested model comparison framework to test the significance of each variable. ...
1
vote
1answer
30 views

Modeling growth curves with different starting sizes (NLME in R)

I am trying to model fish egg growth over time given a starting egg size in R. I have repeated-measures data from individuals with grouping variable "Zafra.1". I do not know when the eggs started ...
1
vote
1answer
24 views

Why do I get so different estimations with glm and glmer?

I am using the glmer function (lme4 package) to get estimations in a Poisson regression model (generalized linear model). I ...
0
votes
0answers
35 views

“singular fit” with lme4's glmer

I have the following data frame and the following two models with lme4's Generalized Linear Mixed-Effects Models (glmer): ...
1
vote
1answer
32 views

Its my model a Mixed model?

I am running some analysis with mixed model with R. I get differents measures from differents persons (person as random effect), during this analysis and looking plots for each people vs measures I ...
0
votes
0answers
18 views

Summary Output for Nested Random Effect in Fixed Effect

I am trying to build a mixed model with random effect nested in fixed effect. Below is an example dataset. ...
1
vote
0answers
30 views

Treating stimuli and participants as crossed or nested random effects in lme4?

I have conducted an experiment where I measured the pupil diameter of 100 participants in response to 9 sounds presented in a random order, all participants heard the same 9 sounds. I would like to ...
0
votes
1answer
36 views

An R package for GLMM estimation with two random effects?

I am looking for an R package to make an estimate on a general linear model with two random effects. I was used to lme4 (function...
0
votes
0answers
31 views

Non-positive variance-covariance in a linear mixed model

I have some problem with my lienar mixed model. When I do my model with the maximum likelihood, I have no error. But, when I want the confidence intervals, I get the Error : " cannot get confidence ...
0
votes
1answer
29 views

Does it make sense to scale categorical variables in glmer when they have three levels?

I am trying to fit a generalised mixed effects model, but I am having convergence problems. The model I want to fit is ...
1
vote
1answer
26 views

Is the significance of an interaction more important that the fit of a model?

I am new to lme4 and I am not sure if I understand correctly. If I want to know if there is an interaction between A and B, I have to write two models and then compare them with anova and the one with ...
10
votes
1answer
239 views

Repeated measures anova: lm vs lmer

I'm trying to reproduce several interaction test between with both lm and lmer on repeated measures (2x2x2). The reason I want ...
3
votes
0answers
55 views

Syntax differences between aov and lmer for two-way repeated measures design

I'm working with the following data frame using R. It consists of measurements obtained from 7 subjects with two independent variables (IV1 and ...
1
vote
0answers
27 views

Under what conditions does it make sense to fit random intercepts for an interaction, but not the main effects?

I am aware that when specifying the random structure for one factor (B) nested within another factor (A), we can use: ...
2
votes
1answer
25 views

Repeated measures: Use random intercepts model, too many intercepts?

This is a common question, but I couldn't find a question / answer on Cross Validated dealing with the same problem. In short, is 1000 intercepts too many intercepts, that is, can individual be a ...
0
votes
1answer
38 views

How to check the linearity of continuous variable in linear mixed model

I'm doing a linear mixed model using lme. In my adjustement factors, I have a continuous varaible (named X1). And I want to check the linearity of this variable using a spline function or a ...
3
votes
2answers
38 views

How to combine random effect and nested random effect with lme

I'm doing a mixed linear model. And I have subjects who have been select in 20 schools. So I want to take this to account. For this, I want to put a random intercept for the "SCHOOL" variable and a ...
1
vote
1answer
37 views

Warning message when using a binomial distribution in glmer() models in R

I asked a similar question in the R forum but realized that isn't the optimal place to post. I'm working with a dataset looking like this: ...
2
votes
1answer
33 views

Minimum no. of grouping variables in mixed models

I have data where I collected y and predictors x1, x2, x3...
2
votes
1answer
32 views

Is it okay to fit linear mixed effects model in an unbalanced design as well as few observations (<2) at specific levels?

We are planning to collect behavioural data from ~200 children. We're manipulating 12 stimulus pairs. Based on 3 different models, for each stimulus pair there will be 3 different values to represent ...
0
votes
1answer
100 views

Model assumption of linearity

I am trying to interpret the outcome of a test for assumption of linearity. This is the dataframe: ...
0
votes
0answers
24 views

forced fixed intercept but lattice plot showed random intercept

I was running a model and something weird pops up. I ran a multi-level regression using the code below: ...
1
vote
0answers
28 views

Interpretation Output lme (Intr)

I`m getting this output from R for my mixed model with lme package. The output seems to be making sense so far and I can interpret it. However I am wondering how I should interpret the correlation (...
2
votes
1answer
61 views

Construction of linear mixed model (using R)

I would like to use Lineal Mixed model to see if the treatments I applied to some soil changed significantly their CO2 fluxes. I have 2 temperature (t1, t2) and 3 inundation (w0,w1,w2), resulting in ...
3
votes
1answer
42 views

Does nlmer() from lme4 assume normal distribution of residuals and random effects?

I am currently reading this paper , according to which Linear mixed-effects (LME) (Laird & H.Ware, 1982) and nonlinear mixed-effects (NLME) models (Pinheiro & Bates, 2000) are ...