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.

Filter by
Sorted by
Tagged with
0
votes
1answer
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 ...
0
votes
1answer
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 ...
0
votes
1answer
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 ...
0
votes
0answers
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 ...
0
votes
1answer
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 ...
2
votes
0answers
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 ...
0
votes
1answer
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 ...
1
vote
1answer
22 views

translate formula from glmer to glmmPQL [closed]

I want to translate this formula from glmer() (lme4 package) to glmmPQL() (MASS package). ...
2
votes
1answer
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 ...
0
votes
0answers
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, ...
1
vote
3answers
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, ...
0
votes
0answers
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 ...
1
vote
0answers
37 views

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

I have experimental data that looks like this: ...
0
votes
0answers
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 ...
0
votes
0answers
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 ...
2
votes
1answer
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 ...
0
votes
1answer
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 ...
0
votes
0answers
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 ...
0
votes
0answers
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 ...
1
vote
1answer
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 ...
0
votes
0answers
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?
0
votes
1answer
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 ...
0
votes
1answer
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. ...
3
votes
2answers
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 ...
1
vote
2answers
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 ...
0
votes
0answers
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_{...
0
votes
0answers
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 ...
1
vote
0answers
24 views

Likelihood Formulation of a Time Dynamic Bradley Terry Model with Random Effects

Let us assume a mixed logit model with a binary dependent variable $y_{i, t } $ that is explained by a fixed effect matrix X and a simple random intercept for each individual $i$ $y_{i,t}^* = x_{i,t}'...
2
votes
0answers
37 views

Can I include random slope for a fixed effect if I only have 1 sample from a few subject ID's

This is my first post here at Cross Validated. Im new to both R-programming and statistics and I have a few questions regarding the statistics of a clinical study I'm currently working on that relate ...
0
votes
0answers
21 views

Bayesian random slope model with divergent transitions. Help in setting stronger priors

I have a model with which I have convergence problems. This are the model specifics (brms package): ...
0
votes
1answer
19 views

How to predict values in one variables using previous observations of another variable, when observation times are different across participants?

We have observations of individuals at various points in their life. We are curious if Variable A predicts later values of Variable B (i.e., if being high on A early on means you will be high on B ...
1
vote
2answers
120 views

Dealing with Overdispersed Negative Binomial using glmmTMB

I'm new to the world of statistical modeling, but I was wondering if anyone had any input on how to handle overdispersed negative binomial data? I'm working on modeling bat activity as a response ...
0
votes
1answer
97 views

Question about GLMM in R

We have a dataset containing drug seizures every month from 2014 - 2018 in Ohio (60 months). For each drug seizure, we have the following variables in a dataframe I’m calling df, with some 130,000 ...
0
votes
0answers
16 views

count data model with capped response variable

I'm trying to predict the total number of Olympic medals won by a country in the summer Olympics games. I have data from 2000 to 2012 relating to the country gdp, population, number of athletes sent, ...
0
votes
0answers
27 views

Am I doing the right model? lm or lmer?

I am looking at the effect of land cover (tree species, grass, woodland) on soil carbon at 3 depths. I have site as a random factor and biomass a covariate. I ran a ranova which revealed there was no ...
0
votes
0answers
24 views

Repeated measures design (2x2 within subject variables) with one continuous variable and one covariate

I have a repeated measures design (one DV measured twice, both times in two different conditions) with one continuous IV and one (continuous) covariate. I'm trying to see if there is an interaction ...
4
votes
2answers
70 views

Mixed Effects, Doctors & Operations: predicting on new data containing previously unobserved levels, and updating our confidence accordingly

Here's a quick sketch of a hypothetical situation. There are Doctors $\{1, \ldots, J\}$ who perform different types of operations $\{1, \ldots, K\}$. Our response variable is whether the operation ...
4
votes
1answer
45 views

Should I weight points in a mixed model to account for groups having different numbers of points?

My research investigates the carriage of Salmonella by raccoons captured on multiple occasions. I am interested in modelling the relationship between sampling interval (number of days between two ...
1
vote
2answers
49 views

Significant interaction, inconsistent with plots/raw data

I'm analyzing experimental data and the model shows a significant treatment effect, but the raw data and graph of the effect don't seem to match it. I want to understand why. I've been looking at this ...
0
votes
0answers
27 views

Mixed effects model--nested effects?

I am confused as to how I should model data from the following experiment design: It is a within participant design so each participant does all conditions: 3 variables Block (home/random) ...
0
votes
1answer
28 views

What distribution would be suitable for this (discrete & ordinal) data?

I have a memory experiment where on each trial, a 7 letter scrambled word is presented, and after a delay the participant is shown the intact word and has to type the previously seen scrambled word ...
2
votes
2answers
80 views

Linear mixed effects model - I can't seem to avoid either convergence errors or messy residuals

I am attempting to run a linear mixed effects regression using the lme4qtl R package. This is a package very similar to lme4, but it allows you to specify a kinship matrix so that you can account ...
0
votes
1answer
52 views

Parameter Estimation in Generalized Linear Mixed Models

Let us assume a generalized linear mixed model with a binary dependent variable $y_{i, t } $ that is explained by a fixed effect matrix X and a simple random intercept for each individual $i$ $y_{i,t}...
2
votes
1answer
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 ...
2
votes
0answers
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 ...
2
votes
1answer
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 ...
0
votes
0answers
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. ...
1
vote
1answer
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-...
0
votes
1answer
56 views

Linear model for repeated-measures regression

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$, ...
0
votes
0answers
20 views

metafor for incidence rates - how to calculate relative risks and 95% CI's

I'm very new to the metafor package and wanted to check my interpretation of the model output, specifically in regards to calculating relative risks and confidence intervals. I've used the rma.mv() ...