Relative Content

Tag Archive for rmixed-models

Calculate Cooks distance for lcmm object (latent class growth analysis) R

I have a longitudinal dataset containing info on repeated BMI measures of children.
I want to run a latent growth analysis for BMI in function of age using lcmm package in R but if I look to the data it seems that there are some influential points influencing the outcome.
Also the results of the lcmm analysis (0.5% of observations in 1 latent class which seems very odd) suggest that influential observations are influencing the results

MIXED EFFECTS MODELING : How to do contrast-coding with a variable that has 3 levels?

To all the R experts out there ! I have recently discovered contrast-coding which compared to dummy-coding just seemed to be a more efficient approach for working with mixed models. Here is the (simplified) logic I followed which will make the question more apparent : Specifiying contrasts… > contrasts(TASK1_Reaction_Times$TYPE_OF_LEARNING)<-c(-0.5,0.5) > contrasts(TASK1_Reaction_Times$MOMENT_OF_TEST)<-c(-0.5,0.5) …centering both variables around […]

How do I resolve singularity issues related to my random effect term in LMM

 I am trying to run a lmm to observe how CH4 and CO2 fluxes change over time. I have a randomized block design with repeated measures over time. I also have an unequal sample size as I wasn’t able to sample a block during one of my time points. I have tried fitting a lmm to my data but see that the random effect, that is controlling for my repeated measures, is causing a singularity issue. I’m afraid that if I remove this variable and run a simple linear regression  I would have pseudoreplication. Here is my code and my output.