The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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.

3,510 questions
Filter by
Sorted by
Tagged with
36 views

Algebraic equations for mixed linear models and when to use constraints on parameters

My issue relates to Question 4a. of Paper 1. The corresponding solution gives the algebraic equation of the fitted model as $Y_{ijk} = \mu + \tau_i + b_{ij} + \epsilon_{ijk}$ and imposes a ...
30 views

Translating multinomial logistic regression into mlogit choice-modelling format

I have an EEG dataset where I have several subjects in multiple sleep stages (~10 subjects, 5 stages). I want to see which of a number of EEG-derived metrics (measured in each subject in each sleep ...
65 views

Odds ratio confidence intervals and p-values suggest different conclusions in a binary logistic mixed-effects model (glmer)

I am running a generalized linear mixed-effects model in R using the glmer function of lme4. The outcome variable is trial-level accuracy in a task (incorrect trials are 0, correct trials are 1), and ...
65 views

Assessing a binary decission based on continuos and multi-level categorical variables

I have been asked to generate a tool to assess if a particular new set of measurements fit within a list of already accepted ones. The problem is that there are different categorical variables with ...
53 views

How to report variance components of random intercept model?

I have used: model1 <- glmer(binary~ X1 + X2 +(1|MAINCATEGORY/YEAR), data = mydata, family = binomial(link = 'logit') To get the variance components of the ...
50 views

conditional independence mixed linear models

I'm analyzing an experiment using linear mixed models but am not sure whether my model is appropriate or whether I'm violating the assumption of conditional independence. I've asked a statistician at ...
50 views

Fitting a linear mixed effects model on longitudinal data with lme4: handling missing values and dates [closed]

I'm still pretty new to linear mixed models, so any help is highly appreciated. In my experiment, a test group (gets the intervention) and a control group (does not get the intervention) are observed ...
22 views

translate formula from glmer to glmmPQL [closed]

I want to translate this formula from glmer() (lme4 package) to glmmPQL() (MASS package). ...
84 views

Linear mixed effect model - Single Trials vs Aggregation [duplicate]

I have a repeated measures design with two factors (A,B). For each subject, variable C is measured 7 to 10 times in each combination of A and B. What I usually did was do first calculate the mean ...
19 views

Post hoc for ordinal mixed model with multilevel categorical predictor

I have conducted an ordinal mixed model with four predictors; all of which are either ordinal or multilevel categorical. In my model comparison, I've found significant main effects and interaction, ...
44 views

In a repeated measures model where assessments are performed over time, should baseline data be excluded if baseline covariate is used?

In a model where subjects are evaluated over time and a baseline (time=0) covariate is used (eg, ...
17 views

Predicting automotive category sales

I am trying to predict category sales for automotive market. The reason I need this variable is because I have been using it in my scoring data-set for a marketing mix model (time series regression ...
37 views

Mixed model using lmer, have I specified my model correctly?

I have experimental data that looks like this: ...
26 views

Should ordinal variable be considered multilevel categorical or continuous in mixed model?

I have an ordinal mixed model with four multilevel predictors (it's for exploration). My response variable is ranking 1-4 and so is one of my predictors. My question is if I should treat this ordinal ...
50 views

Evaluation of variance components - mixed models

How can I evaluate if the variance components of a nonlinear mixed model make sense (assuming or not assuming treatments factor)? For instance, if I am assuming an unstructured variance-covariance ...
39 views

Understanding ANOVA to compare Mixed Model with a GzLM

I'm having a hard time understanding how can I compare a GLM with a GLMM, knowing that I probably can't compare their AIC as glmer from lme4 probably computes the maximum likelihood differently from ...
48 views

Is there a difference between averaging individual regressions and including a random effect?

I have a bit of a theoretical question about random effects models and regression. If I have a set of clustered, longitudinal data (say repeated measurements of $y$ on a number of different ...
16 views

Coefficient Averaging to Predict Value at end of Time-Series/Possible Random Effects Model?

I have some discrete time series data that consist of the following variables of interest: Project ID ($project\_id$) The total budget for a particular project ($tot\_budget$) The person who runs the ...
31 views

Effect size in linear mixed models

Thank you for reading this question. I know there have been a few discussions regarding this topic, but I couldn't get a satisfactory answer. So here is my question, with some details in the ...
43 views

Is it a fixed or random effect?

My design goes like this: I have 1 treatment and one control, organized in 3 blocks, each have 1 site of control and 1 site of treatment, each site have 2 subsites, and I sampled 6 quadrats per ...
9 views

How to fit linear with Multimodal indepdndent varibale [duplicate]

How can i fit linear regression if my dependent variable is log normally distributed and independent variable is bimodal or multimodal?
74 views

AME (Average Marginal Effect) for lme4::glmer using margins::margins command

I am running a logistic mixed model regression using lme4::glmer Command. I wanted to report AME (average marginal effect for my coefficients). I used the ...
88 views

Gradient Boosting with Random Effects [duplicate]

I want to run gradient boosting regression on a dataset whose rows are not independent. Specifically, the rows are clustered, and you could consider the clustering variable to be a random effect. ...
114 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 ...
117 views

Appropriate GLMM distribution for ratings data that are bounded and discrete

I am using a linear mixed model to explain variation in an object's ratings. These ratings are bounded between 0 and 10, and take only discrete values (example histogram of the raw data below). Note ...
28 views

Maximum likelihood estimation of simple multilevel regression model

I have a two-level regression model: $$Y_{ij} = \beta_{0j} + \beta_{1j} X_{ij} + \epsilon_{ij},$$ where $$\beta_{0j} = \gamma_{00} + \gamma_{01} Z_{j} + \mu_{0j},$$ and  \beta_{1j} = \gamma_{...
31 views

R squared for linear mixed models

I have a large dataset with longitudinal data from patients with repeated measures and unbalanced timepoints. The dependent variable is the level of protein, and I have several fixed predictors. The ...
24 views

26 views

nesting/crossing in lme4

My question relates to the excellent answer given to this question a couple of years ago "Crossed vs nested random effects: how do they differ and how are they specified correctly in lme4?" The answer ...
18 views

Can I use item as random factor if not all participants saw the same items?

I'm running an ordinal mixed model on data collected from when my participants ranked 16 photos of people of who they think are most similar to them. Depending on the age of the participant, they ...
59 views

Linear Mixed Model equation (as of lme4 package)

I am trying to derive the equations of a linear mixed model as specified in the documentation of the lme4 package: "Fitting Linear Mixed-Effects Models using lme4" jstatsoft.org/article/view/v067i01 ...
17 views

Simulations for mixed effects models - related variables

I am trying to create a simulation for a power analysis with a mixed effect model. Each participant will be tested on four different variables. The data for these variables should be related, i.e. ...
57 views

Writing out equation for linear mixed model

I have a linear mixed model with two random effects. In R it looks like this: lmer(y ~ x1 + x2 + x3 + x2:x3 + (1|Plot) + (1|ID)) I figure for a fixed-effect-...
I have two independent variables $y_{mi},z_{mi}$ ($z$ is measured in fasting, so it is the basal state), measured with two different methods $m$ (m=2 is the reference method) in the same subjects $i$, ...