Questions tagged [lme4-nlme]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
6 views

wi (𝒘і) output from regression - what is this? [closed]

I have run a mixed effect model and want to describe the output can someone please explain what the 𝒘і is? thanks!!
0
votes
0answers
10 views

P values from lmer with lmerTest - why REML= TRUE?

I would like to obtain p-values from my model fit with lmer()from the lme4 package. It looks something like this: ...
0
votes
0answers
10 views

Store whether there was a convergence warning in a lmer ran via afex (R) [migrated]

I want to run many linear mixed models (one per time point of a time series). I plan to permute and correct for multiple comparisons later. The minimal example outputs the result below. Is there a way ...
0
votes
0answers
15 views

How to define the random effect part of a linear mixed model for a repeated measure experiment?

I have some doubts about writing my model to analyze a repeated-measure experiment. Basically I have: 1 between-subjects variable (Group) that represents 2 different groups 1 Within-subjects variable ...
0
votes
0answers
8 views

Random effects syntax in lme4 or nlme for linear mixed effects model

I’d really appreciate some guidance with specifying random effects in a model. I thought I’d designed quite a neat experiment, but I’m confused about how to correctly specify my experimental design in ...
1
vote
0answers
27 views

Random intercepts distribution looks normal but multimodal. Does this still follow the normality assumption?

My model gives me random intercepts in which the distribution looks like: The model is as follows: mod <- lmer(response ~ 0 + item + (1|id), family = binomial) ...
0
votes
0answers
22 views

Can we compare the beta for one predictor across two nested linear mixed-effect (LME) models or generalized linear mixed-effect models?

In my experimental linguistics research, I would like to evaluate how an interaction effect is influenced by additional predictors. To be precise, suppose there are 10 questions in my experiment. The ...
1
vote
0answers
8 views

Bootstrap confidence intervals for betas in a linear mixed model

I am trying to calculate bootstrap intervals for my beta coefficients in linear mixed effect models. I used the lme()function from the ...
0
votes
0answers
10 views

Transformation of a fixed effect?

I'm working with a data set where I relate the response variable weight gain/loss (it goes from -110 g to 150 g) to multiple explanatory variables. It looks like this: lmer (weight.difference ~ A * B ...
0
votes
0answers
6 views

Specifying the random effect for repeated measures mixed model

I have two treatment plots: impact and control these treatments were sampled over 5 different time periods: T0, T1, T2, T3, T4 Within these plots: 4 replicates were taken for the control and 9 ...
1
vote
0answers
24 views

longitudinal analysis: a cluster switched from control to treatment in R

I have a longitudinal dataset (see below). Up to year 1, $8$ schools ($4$ in Treatment, $4$ in Control) stayed in the study. But in year ...
1
vote
0answers
25 views

Doubts about the use of Cross-Validation in GLMM

I've recently ask in statckoverflow about some doubts with logistic regression fitted with a GLMM and an user recommend me asking in this forum. So, here it goes. I work with a wild population of a ...
0
votes
1answer
27 views

K-fold cross validation for GLMM

hope all of you are safe during these pandemic scenario. I would describe my case so you can get a better understatement of my question. I work with a wild population of a bird species in which we ...
0
votes
1answer
24 views

What post-hoc test should be used for a glmer model with a binary response, and a continuous and categorical predictor?

I'm a bit of a newbie with stats and R, so need a bit of direction to find a suitable post-hoc test for my glmer model. I'm trying to find if presence is affected by environmental factors for each ...
0
votes
0answers
25 views

nested random effect - Can I nest continuous (time) and categorical variable (condition)?

Apologies for another stupid question within such a short period of time. I am struggling to include "Time" (continuous variable) in my model where I test the effects of 3 "Periods" (conditions) in a ...
2
votes
0answers
57 views

Round values to fit a negative binomial using GLMMs

I am using a GLMM to model a network metric that ranges from 0 to 100 (contribution to nestedness) and trying to fit a model with four predictors and two random factors (species and site). I have 591 ...
1
vote
0answers
15 views

Bootstrapping for missing data in a linear mixed model

I am trying to analyse data from an experiment. I would like to use a linear mixed model with either lme() from the package nlme or lmer() from lme4 in R. In my experiment subjects were randomly ...
1
vote
1answer
27 views

Optimize over theta or theta and beta in logistic mixed model (nagq = 0 vs nagq = 1)

I've been reading about item response model guides for R and my model is : ...
2
votes
2answers
25 views

Removing Subject Random Effect From Mixed-Effects Models & Violation of Independence

I'm running logistic mixed-effects models for a project using glmer(), but ran into a few problems with model fit. In this model, there are 2 fixed effects: ...
0
votes
1answer
18 views

Different p values using glmer vs glm

I'm not sure whether this is more of a StackOverflow question or a Cross Validated question, but here it goes. I tried running a GLM comparing measures of my variables between genders (sampling units=...
0
votes
0answers
10 views

Different p values using GLM vs GLMM

I tried running a GLM comparing measures of my variables between genders (sampling units=id). ...
0
votes
1answer
50 views

interpreting output for glmmTMB for zero-inflated count data

I have been trying to read all the documentation I have, but I'm still not sure what the difference is between the "conditional" and zero-inflated models in the output of the glmmTMB. Below is some ...
0
votes
0answers
24 views

Understanding the formula for linear mixed model

I have found the below description for the LMM formula in R from: http://www.stat.rutgers.edu/home/yhung/Stat586/Mixed%20model/appendix-mixed-models.pdf. I'm however having trouble understanding why $...
0
votes
1answer
17 views

Different results for model comparison using ANOVA function for REML and ML

I got this interesting results when I use anova test to compare two nested models. I fitted two nested mixed effects models with ...
7
votes
1answer
178 views

Analyzing a partially crossed design

I have a data set from a test (see below). The scoring algorithm gives each item (item_id) a score (y) that is continuous from $...
0
votes
0answers
8 views

Assess groups variation through time

I have data with individuals (ids), for each individual I have multiple (t) measurements (y), and each individual can be assigned to a category (cat): id cat time y a cat1 1 1 ...
0
votes
0answers
14 views

lmer with random effects shows insignificant interaction term despite confidence intervals not overlapping

I am trying to interpret an analysis on urchin biomass and how the means differ between 2 sites (Waikiki and Hanauma Bay) and 2 experimental treatments (low and high shelter). Because of the nature ...
1
vote
0answers
23 views

predicting waste per capita: is a Gaussian model correct?

I am trying to predict the daily amount of waste per person produced in the fishery sector. We surveyed fishing boats at the end of their fishing trip and the variables I have are duration of trip (...
0
votes
0answers
12 views

R: problem using emmeans with lme4::glmer object with logit link

I am trying to fit a mixed-effects model using lme4, using logit link transformation. It is a very simple model, where the response ...
0
votes
0answers
26 views

Help with random effects structure in logistic mixed-model fit using lme4

I have a theoretical question about the necessary random effects structure for an experiment that I ran. The experiment has participants rating fake words as either 1 (yes this can be a word) or no (...
1
vote
1answer
35 views

Ordinal independent variable in mixed model - coding as factor vs continuous

I want to model data from behavioural experiment (mixed model using R's lme4) with continuous DV and two predictors: condition (binary) and block (24 subsequent blocks of experimental task). Both are ...
0
votes
0answers
13 views

Diagnostic glmer plot: residual vs fitted need help for interpetation

I have fit a generalised linear mixed-effects regression (glmer) model with the lme4 package. I check for Homoscedasticity with this plot (see below). Here I am ...
1
vote
1answer
26 views

Interpretation of intercept in linear mixed model

I have made a Linear mixed model in R, but I'm having trouble interpreting the results. The model is Y ~ Group + TP + (1+TP| Subjectnum, where Y is volume in %, ...
0
votes
0answers
11 views

Difference between varFixed and varPower

Hello and thank you in advance. I am using a multi-stage approach for my model. linear model for abundance vs time, linear model for temperature vs time, extract slope and sd of each (for each ...
1
vote
0answers
11 views

Striped residuals from Generalized Mixed Model

Related Q: Interpreting plot of residuals vs. fitted values from Poisson regression I have had "stripey" residuals from a Generalized Mixed Model (with gamma distribution) but am still confused from ...
0
votes
0answers
24 views

Linear mixed-model with aggregated data

I have a dataset of the following form and I would like to fit a mixed model in order to benefit from the shrinkage effect on the number of observations per subject: ...
0
votes
0answers
8 views

convergence issues depending on interaction term

I'm starting out with mixed effects modelling, and trying to run a model with a longitudinal dataset that looks like this: ...
0
votes
1answer
13 views

Why the variation between CIs computed with emmeans and confint are so high?

I have some strangeness going on when calculating CIs for my model. I've found 2 ways to do this, and I decided to try them both (emmeans and confint). I have 6 timepoint and 2 groups. My model looks ...
1
vote
1answer
11 views

Estimated marginal means and arithmetic means are different

I have the following data set where I am testing how fast people can recognise words in different conditions - pre-test (before learning), immediate (straight after learning) and delayed (a long time ...
1
vote
1answer
7 views

Interaction within*between in mixed models: slope of the within factor as random or not?

I am struggling with conceptual understanding and analytical choice in mixed models. In a within-subject experiment (2 conditions, factor X), I want to test if the effect of the condition on the ...
0
votes
2answers
73 views

Best Linear Mixed Effect Model structure

I'm trying to build mixed-effects models but having trouble working out what the best model structure is. I have 4 variables: individual ID, time $t$, biomarker $x$ and biomarker $y$, both continuous ...
0
votes
0answers
10 views

intraclass correlation (ICC) to assess interrater reliability with repeated measures in R

I need to estimate the reliability of three raters (A,B,C) rating insight in psychotherapy patients every 10 minutes on an "insight" scale. Given that the experiment lasts 40 minutes, for every ...
0
votes
0answers
15 views

Nesting fixed effects in random effects

I'm fitting a multilevel model that has a random effect nested within a fixed effect: ...
3
votes
1answer
35 views

regarding profile function in the context of linear mixed effects models

I started to learn about fitting linear mixed effects models. I am using lme4 package. To demonstrate my problem i used following example. ...
0
votes
1answer
51 views

Mixed effect model specification for repeated measure placebo controlled trial

I am analyzing gene expression data for a repeated measure placebo controlled clinical trial. Example dataset: ...
2
votes
0answers
28 views

Power-analysis and effect size in linear mixed models (post-hoc)

I'm currently analyzing data using linear mixed models (lme4 package in R) for my master thesis, and my promotor suggested running a post-hoc power analysis to justify that some factors did not end up ...
1
vote
0answers
13 views

How can I get the adjusted values with respect to a specific effect in a linear mixed effects model?

I'm using R and lme4 to estimate the parameters of a model ...
2
votes
2answers
37 views

When you have a variable that can be both fixed and random, is there a right way to define it in lme4?

I have an outcome variable painRating which represents how painful a participant found a sensation. I can reasonably expect ratings to be affected by a painful ...
1
vote
1answer
47 views

How to write LME model in R?

I'm new to LME and i'm trying to make a longitudinal LME analysis in R of changes to the volume of the hippocampus in elderly people. The data consist of ~300 subjects which have been randomly ...
0
votes
0answers
16 views

Interaction and Main Effects in mixed effects model - crossed design

We want to run a mixed effects model for our experimental design using lme4 package in R and want to confirm if our model is specified correctly. Our design involves two random factors (participants ...

1
2 3 4 5
45