Skip to main content

All Questions

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

Linear Mixed (Multilevel) Model: Predictors and outcomes at different timepoints

I'm analysing data from a randomised controlled trial, and want to predict a change in an outcome (reduction in anxiety scores from Baseline to Week 4), based on two predictors measured at the two ...
J K's user avatar
  • 1
0 votes
1 answer
47 views

Visualising a mixed effects model

So as the title suggests I would like to visualise these two models that I have in order to better understand their relationship. The first one is a fixed slope model and the second one is a random ...
SMRquestion's user avatar
0 votes
1 answer
54 views

How do I check what R used as reference level for my dichotomous outcome in a GEE analysis (using geepack)?

I've got clustered patient data of 700 patients (clustered into two groups for two different hospitals). I'm trying to figure out if a certain cardiovacsular risk factor exposure (factor with 3 levels:...
tcvdb1992's user avatar
  • 455
2 votes
1 answer
98 views

Random Slope model Assumptions

What are the assumptions of a random slope model? In particular I am interested in knowing the assumptions about level-1 and level-2 residuals and what are their expected theoretical distributions. My ...
Bra's user avatar
  • 21
1 vote
0 answers
148 views

How to write code for Level 2 data for Multilevel Modeling using nlme package

I am struggling with how to describe level 2 data in my Multilevel Model in R. I am using the nlme package. I have longitudinal data with repeated measures. I have repeated observations for every ...
Vanessa Lin's user avatar
4 votes
0 answers
669 views

Estimating and plotting predicted probabilities from a multilevel ordinal logit (clmm)

I'm estimating a multilevel ordinal logit with one interaction term using clmm. The coefficients I get are interesting and statistically significant and I now want to compute and plot predicted ...
saladin1991's user avatar
0 votes
0 answers
151 views

Alternative solutions to multilevel modelling due to level 2 and 3 not having enough clusters

I have been running some multilevel models on my data but have now been told my clusters are too small and I need to consider taking out two of the levels and add them in as covaraites (dummy ...
Jade's user avatar
  • 1
0 votes
1 answer
125 views

About the u and u0 values from lmer in lme4 [R]

I am learning mixed models from https://www.cmm.bris.ac.uk/lemma/login/index.php and this question is regarding an exercise in Module 5. The data has 33,988 observations from 508 schools. The ...
Piyush Shah's user avatar
1 vote
1 answer
796 views

Specifying a non-linear relation between random effects in R

I'm working with multilevel models to try and describe different patterns in longitudinal change. Dingemanse et al (2010) describe a 'fanning out' pattern when the random effects are perfectly ...
Niek's user avatar
  • 1,624
0 votes
1 answer
4k views

Predicting probabilities in R with mixed effects model

I have defined a binary response mixed effects model using the R function glmer as follows: fit <-glmer(binary_r ~ cat1 + (1 | SUBJECTIDf) + (1 | cat2) + (1 | cat1:cat2), ...
Purist's user avatar
  • 1
2 votes
1 answer
3k views

what is a model matrix / design matrix

I stumbeled upon the stats::model.matrix function in R. In the description it sais that it would create a design matrix. It gives me a weired number of rows, which does not correspend to neither the ...
vanao veneri's user avatar
  • 1,064
0 votes
0 answers
109 views

Interaction not significant when using a logistic model but is significant using a poisson/negative binomial model

I ran an experiment in which participants were asked to pass a story along a 4 person 'transmission chain', a bit like the game Chinese Whispers. Person 1 reads the story and re-writes it for person 2,...
keelybebbington's user avatar
7 votes
2 answers
10k views

Standardized coefficients for lmer model

I used to use the code below to calculate standardized coefficients of a lmer model. However, with the new version of lme the structure of the returned object has changed. How to adapt the function ...
majom's user avatar
  • 8,041
2 votes
0 answers
104 views

How to model multiplicative effect of parameters/fit data at individual predictor level

I am having difficulty in fitting a model on data. Basically, I have data about the evaluation of phenotypic property (i.e. hard) of 65 palm trees by 5 judges. As an evaluation scheme, each judge ...
maddy's user avatar
  • 21
1 vote
1 answer
392 views

Adding abline to augPred plot

apologies for what is likely to be a very basic question, I am very new to R. I am looking to read off my augPred plot in order to average out the values to provide a prediction between a time period....
Rbeginner's user avatar

15 30 50 per page