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
2answers
24 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
16 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 ...
0
votes
0answers
13 views

Estimating density dependence parameters from repeated measures data [on hold]

I've been having trouble understanding how to use R to do an analysis that combines elements of GAMM and nls to calculate population dynamics parameters on data with repeated measures. I'd really ...
1
vote
0answers
21 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
41 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
26 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
43 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
13 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
20 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
43 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 ...
0
votes
0answers
14 views

GLMM analysis for multiple choice experiment

I’m a little bit desperate with this, so I really hope anybody can give me a hand. I did a multiple choice experiment, in which I had animals (n =6 per replicate) within an experimental arena, where ...
1
vote
0answers
11 views

Inconsistent results between sjPlot and Anova()when including interaction terms in lmer() in R

I am using this R package "sjPlot" to plot the forest-plot of standardized beta values. My model includes interaction terms ...
0
votes
0answers
11 views

Compare changes between groups over time

I have 2 groups (genotypes WT and KO) of indivuals for whom I obtain their weight each month during a year. The simple question I want to answer is: Do the WT group gain more (or less) weight that KO ...
1
vote
0answers
18 views

nlme - multiple regression with categorical factor - proper coding?

I am certain this question has been asked several times, yet I can't seem to find the correct code or explanation. (will remove it if I find a solution) I have a rather simple design, yet I can't ...
1
vote
0answers
19 views

Model to explain why the correlation is bad

I performed three experiments where I measured a metabolite in blood over time using two different methods (called gs and se in ...
1
vote
0answers
53 views

Different interaction p-values in R versus SPSS

I originally ran my data in SPSS because figuring out the lmer package took some time for me to learn. I spent a few weeks writing up a script in R, but my output in R is different than what I'm ...
2
votes
1answer
34 views

Can repeated measures variable with only 2 levels be nested within participants in lmer function?

Here are the libraries library(tidyverse) library(lmer4) I'm using the data that comes with it: sleepstudy. The example in the vignette is... ...
1
vote
0answers
15 views

Which model with multiple samples by subject and one response by subject? glme?

I have a few variables (continuous or ordinal) and multiple samples from the same subjects (n=10 for now). The number of samples by subject varies from 1 to 50. Samples are not repeated measure s in ...
0
votes
1answer
35 views

lmer fixed effects coefficients: which is the term of comparison for levels? [closed]

I have a lmer model with two within factors lmer (variable ~ time * condition + (1|id), data= df) with time having 2 levels (<...
0
votes
1answer
17 views

LME4-package: glmer function in RStudio. do i need to scale and normalize the data-matrix?

I am using the glmer() from the lme4 package. In the model, I have 6 different variables and multiple samples from the same patient. Five of the variables are ...
1
vote
2answers
74 views

Mixed models: predict random intercept with partial data

I have a dataset with growth data for teens between 12 and 18 years old, where I want to predict throwing speed for all ages using a couple of other predictors. These predictors have been collected in ...
1
vote
1answer
28 views

Why is my ANOVA output identical when comparing two models?

I am comparing two models in order to see if a specific interaction (SessionGroup) is significant. Mod1 is the full model, Mod2 is the full model MINUS the SessionGroup interaction. ...
1
vote
2answers
62 views

lme4::glmer : Get the covariance matrix of the fixed and random effect estimates

My problem may seem easy but I have found no satisfactory solution. I am stuck on this problem for a few days already. How to obtain the covariance matrix of the fixed AND random effects estimates ...
0
votes
0answers
18 views

How to consider repeated measures and correlation between factors in a tree way ANOVA?

I'm new to statistics and I don't understand the differences between the different functions used for linear models. I need help for choosing which function to use and how to write it to consider all ...
1
vote
1answer
19 views

Models converging with different versions of lme4

I'm working through Page Piccinini's R course and currently at lesson 6 on MLEMs. On occasion, I get different responses in the console than what Page Piccinini is presenting as her output. This leads ...
0
votes
1answer
28 views

forward selection with mixed model using lmer [closed]

I am running a mixed model in R and would like to perform forward selection using the step function. However, when I set the direction to forward ...
2
votes
2answers
54 views

where to specify covariates in a linear mixed effect model

I am using lme4 to create a mixed model for my data. I am looking at the effect of land cover on soil properties at three depths, for example, carbon concentration. I have identified my fixed ...
0
votes
1answer
27 views

How to interpret quadratic effects?

I have built a LMM (using LME4) for understanding how investment fund's structural characteristics (things like how much debt they have, their size etc) impacts upon performance. In the analysis, I ...
0
votes
1answer
19 views

Unexpected lme result using level-2 predictor in the random part of the model

Level-2- predictors (Z) allow for modelling the level-1 slopes. They do not vary within a level-2 unit. However, it is possible to include them in the random part, ...
1
vote
0answers
18 views

Modeling repeated measure effect with linear mixed effect models (lmer) in R

this is the first time I'm posting a question here, I hope someone will read it soon :) I have the following problem: I have three groups of people (ADHD patients, ADHD patients under medication, ...
1
vote
2answers
66 views

How should I account for repeated measures in a mixed effects model in R?

I'm new to linear mixed-effects models and I was wondering if I could get some help in getting my model to properly work. I have an example dataset: ...
0
votes
0answers
14 views

Between grouping-factor variance-covariance matrix

I am working with lmer in R and am unsure on the assumptions on the variance-covariance matrix for the random effects in a mixed effects model. If I have a 2 ...
1
vote
1answer
30 views

Clustering and interactions in a multilevel model in R

We are conducting an individual participant level meta-analysis on a series of clustered randomised controlled trials, where we are mainly interested in an interaction effect with a characteristic (...
4
votes
2answers
100 views

Don't understand why glmm random effect variance is zero. Have reviewed similar questions still dont get it

I study a colonially-nesting bird species. I am trying to perform an AICc evaluation of GLMMs for a nest site selection study. I collected data at nest sites and paired random sites. I want to ...
0
votes
0answers
46 views

Interpreting glmer output

I find myself buried deep into a generalised linear mixed effect model, slightly out of my depth, and need help interpreting what its saying and diagnosing the model assumptions. The model: ...
0
votes
0answers
13 views

non linear mixed effect model with unbalanced data

I am using nlme to model the growth curves of individuals that are in 4 different groups, using R. The number of individuals in each group is completely unbalanced (n1=344, n2=51, n3=34, n4=25). ...
0
votes
0answers
9 views

BLUPs post-hoc analysis

When a model with only random effects is fitted using any package (i.e. lme4 glme()), BLUPs can be obtained for the factors with ranef. Using those values for bivariate correlations, principal ...
0
votes
1answer
30 views

Multilevel analysis - interpretation not significant at level 1

I'm doing a multilevel analysis for the first time for my master thesis. The goal of my study was to create behaviour change through an intervention. Participants are measured for behaviour at 3 ...
0
votes
0answers
45 views

logistic regression with two continuous predictors

Let's say I conducted an experiment in which I measured if customers bought a particular product and also measured customer satisfaction with the shop and familiarity with that product. The dependent ...
3
votes
1answer
85 views

Random effects in repeated-measures design using lme

I have a repeated-measures design where participants were measured 4 times each on 2 consecutive days. There were 2 conditions, randomly attributed to day 1 and day 2 for each participant. So, this ...
0
votes
1answer
17 views

How to address a detected nesting structure using emmeans

I'm analysing the results of a M BACI experiment. When trying to estimate means using emmeans, I'm getting this message: NOTE: A nesting structure was detected in the fitted model: BurnType %...
1
vote
0answers
27 views

Accounting for spatial autocorrelation in model - A simulation

My question, in short, is: I was trying to demonstrate that accounting for spatial autocorrelation reduces the overestimation of significance of a non-autocorrelated fixed effect. The result, ...
1
vote
1answer
23 views

Can I compare AIC between models that are fitted with different 'optimizers'? e.g BOBYQA

I have two linear mixed-effects models using the same sample, the same random effects and the same response variable. They differ in a single fixed effect. One of the models seems to give better ...
0
votes
1answer
118 views

Model is nearly unidentifiable: very large eigenvalue

I'm fitting a generalized linear mixed model using glmer() and I'm getting a warning that I don't understand: ...
0
votes
0answers
16 views

How to write model with fixed factors nested in random one?

I'm at the beginning of models understanding so this question is maybe childish, excuse me, please. It is close to this but there are some differences and I'm not sure how to implement that solution ...
0
votes
1answer
26 views

In glmer, can I treat both like a random effect and a fixed effect the same factor?

I conducted a memory study and used glmer to find if there was an interaction between time and ...
1
vote
1answer
38 views

My confidence intervals for a negative binomial mixed-effect model are not right?

I'm using glmms with a negative binomial distribution from the lme4 package. I've run my model (Checked for singularity) and have plotted the fitted values along with the 95% confidence intervals for ...
0
votes
1answer
32 views

Using lme4/ linear mixed model to model longitudinal data in which age at first test and duration between measurements vary

I need specify a model using lmer() with data (n > 3500) in which there is a lot of variability in the age of the (human) subjects and also the duration between measurements (5 measurements total but ...
0
votes
0answers
10 views

Adding interaction term to multivariate parallel growth model nlme/lme4

I've been using examples from Grimm, Ram, and Estabrook (2017) to construct a parallel multivariate model to explore the relationship across time between two continuous variables, FS and Left_dlPFC. ...
4
votes
1answer
128 views

What methods are appropriate for testing correlations between binomial count (but not presence/absence) data?

Is it appropriate to analyze the relationship between a proportional explanatory variable and a proportional response variable (as cbind(option 1, option 2), or as a proportion with weights) using ...