# Questions tagged [mixed-model]

Mixed (aka multilevel or hierarchical) models are linear models that include both fixed effects and random effects. They are used to model longitudinal or nested data.

4,197 questions
Filter by
Sorted by
Tagged with
20 views

### Modeling repeated cross sectional clustered data

I have repeated cross sectional data from convenience samples of students nested in schools nested in districts. I have data on student-level behavioral outcomes (binary) and school-level program ...
22 views

### Is there a joint test of model coefficients, effectively testing for main and interaction effects in quantile linear mixed model?

I am just reading this paper: Linear Quantile Mixed Models: The lqmm Packagefor Laplace Quantile Regression. Let us assume I have a repeated observation experiment, where I want to assess the effect ...
29 views

### Can I use different data types in a general linear mixed effects model?

I've become quite familiar with linear mixed effects models but I'm not very certain about their General counterparts. I have a data set which looks like the following: ...
27 views

### How can I construct the random effects model matrix from a mixed model formula

Let us say we have a mixed effects model formula. For example, in R using lme4, consider two formulas: Y~X1+X2+(1|fac) and ...
67 views

### Nested Experimental Design: Intuition about power?

I am planning a nested experimental design, where 1000 participants respond to one policy proposal coming from a 2^3 design (125 participants for each condition A x B x C). Yet, the policy proposal ...
33 views

### Fitting Joint Model with GLMM

I'm looking to fit a joint survival model (example). For those who are unfamiliar, joint survival models are Cox proportional hazard models where the covariates are allowed to be time-varying and are ...
43 views

### Between-subjects, factorial, crossed, cross-classified: all the same thing?

Suppose I have a test with $j$ items taken by $i$ persons. I wish to obtain the mean item score (y) taking into account that both items and person are a sample of ...
13 views

### Effects package equivalent for LCMM [closed]

The effects package helps in the analysis of predictor effects from LMER models. Is there an equivalent for LCMM models? (i.e. understand predictor effects of class ...
22 views

42 views

### spaMM::fitme() - error troubleshooting and application to longitudinal data [closed]

I'm trying to fit a GLMM that accounts for spatial autocorrelation (SAC) using the spaMM::fitme() function in R. I have a longitudinal data set where observations were collected repeatedly from a ...
65 views

### Does sample size affect choice between fixed and random effect

I am analyzing data as given in this question: Should "City" be a fixed or a random effect variable? Here it is debatable whether "City" is to be kept as fixed effect or random ...
23 views

...
39 views

### Which model and distribution to use to fit continuous proportional data with random effects; glmmTMB, glmer, lme? I am getting errors with all 3

I am having trouble determining the most appropriate model to fit my continuous proportional data. I am analysing the proportion of time individuals were detected within an acoustic receiver array ...
562 views

### Should “City” be a fixed or a random effect variable?

I am analyzing data on "BloodSugar" level (dependent variable) and trying to find its relation with "age", "gender" and "weight" (independent variables) of ...
40 views

### Is this correct use of linear mixed model?

This is the current data I have I want to know if fixed factor A has any effect on C. That is, if A1 = A2 = ... = A5. I think I am trying to find a group difference, correct me if I am wrong. ...
32 views

### R - Data Simulation with Multiple Random Slopes

I am trying to run the following model: I(week^2):mutation_status + (week + I(week^2) | subject_id) , data = sim_dat) This is the output I ...
32 views

### Comparing model performance: do fixed and random effect regression models give different model ranking?

I am a graduate student in animal science. I am comparing linear models that fit covariates of var1 and var2. These two covariates are decomposed from one quantity say F (inbreeding level of animal). ...
26 views

### Multilevel hierarchical simulation? What model to use?

The problem: I have a dataset that I think could be deemed hierarchical. Assume that there are 1-100 ids, which all can have anywhere from 1-3 sub_ids. Both the top ids can have specific features that ...
64 views

### Non-normality in linear mixed models/GLMM

I have some data of time-depth profiles of whales. I want to model how the maximum depth of each dive (deepest point reached during a dive) changes between two dive types, foraging (if the whale feeds)...
68 views

### Correlation of two continuous variables but with clustered data

I want to correlate two changes in time, a change in microbiota with a change in some marker. There are several time points, so I have several differences in each participant. My idea is to see if ...
46 views

### Comparing lmer and LCMM (single class) models

I am modeling the same dataset using both lmer and LCMM. My understanding is that if I use class count of 1 for LCMM, the models derived from both methods should be very similar. However, as seen in ...
145 views

### Difference between Repeated measures ANOVA, ANCOVA and Linear mixed effects model

What is the best way to analyze these data: Subjects are divided in two "Group" (Treatment A and B). "Weight" is recorded before and 3 months after treatment. Outcome variable: ...
36 views

### lme4: prevent 'glmer' to have zero estimated random coefficient

I use the glmer function with the Poisson family from lme4. My simulated data are constituted of 3600 individuals, and a ...
22 views

### Preparing **probabilities** data for mixed effect modeling

I have two related problems i cant seem to find an online solution and would really appreciate any direction. I am modeling probabilities* as a function of different predictors, across 35 subjects. X1 ...
22 views

### glmmLasso vs. lmmLasso vs. LMMEN to reduce highly correlated predictors?

I have trouble choosing the correct model and parameters for my problem. I have around 20 experts who rated the quality of brain tumor segmentations for around 20 patients on a 1 to 6 star scale. I ...
17 views

### How to model repeated measurements with the same outcome in a Bayesian framework?

Can't think of a more accurate title, so I'll illustrate the problem with an example. I want to record temperature using cheap noisy sensors. I also have recordings from a gold-standard reference ...
36 views

### Estimating a paired samples t-test equivalent in mixed model with two random factors

I have data where 880 participants answered 10 questions at time 1 and at time 2. I want to use a mixed model and consider both participants (id) and questions (question) as random effects. I'm using ...
53 views

### Follow-up: Complete-pooling, no-pooling, and partial-pooling regression in R

This great answer demonstrates the concepts of "complete-pooling regression", "no-pooling regression", and "partial-pooling regression" (3 concepts) using simulated data ...
24 views

### How to interpret main effect with two interaction terms?

I have three variables in a multilevel model: Relationship Status (0 = single, 1 = not single) Living Arrangement (0 = alone, 1 ...