Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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.

1
vote
2answers
10 views

Linear mixed effect model interpretation with log transformed dependent variable

I have a dataset in which the response variable is non normal, but on log transforming, it follows the normal distribution. I constructed a mixed effect model using lme4::lmer() as below (multiple ...
5
votes
1answer
71 views

How to account for multiple measurements of same person in either two-group comparision or regression?

I am running analysis on clinical data collected from patients which are correlated either by time (longitudinally) or more commonly different measurements of the same person at same time (eg. ...
3
votes
0answers
30 views

Can this be solved using a binary logistic multi-level model?

Is it possible to solve the following task by using a binary logistic multi level regression? If not, how can you solve it? The concept as a diagram: I have the location of individual stores and ...
0
votes
0answers
17 views

Effect size of a mixed-effects model

In short: how to extract the different sum of squares from a mixed-effect model built using "lme" function in R (package nlme)? In long: I am trying to finish my first experimental study. One ...
0
votes
0answers
12 views

Mixed models for zero-inflated count data in R?

I have a dataset containing scores on a measure of uncommon experiences. The scores are derived as a count of the number of items rated as present divided by the number of items that were answered by ...
0
votes
0answers
7 views

Is mixed models a better choice comparing to ANOVA? (SPSS)

I have two groups in which I compare two times (before and after treatment). At first, I tried an repeated measures ANOVA and observed significant difference between groups. However, I have the ...
0
votes
0answers
14 views

nlme error when testing for heteroscedasticity

This is the first question I've ever posted on a forum so I hope I'm following the correct protocol. I've been teaching myself R and using it to run mixed effects models following the recommendations ...
0
votes
0answers
7 views

Checking for change in significance of regression coefficient after adding covariate

I'm wondering whether there is a way to check whether a coefficient in a linear mixed effects model changed significantly after introducing a new variable. I have two models: ...
0
votes
0answers
11 views

Tensorflow Examples of Media Mixed Models

I'm starting to research MMM models and I was wondering if anyone knew of any examples of implementations in python with tensorflow. A github repo with some example code would be really handy for the ...
10
votes
3answers
354 views
+100

Mixed effects model: Compare random variance component across levels of a grouping variable

Suppose I have $N$ participants, each of whom gives a response $Y$ 20 times, 10 in one condition and 10 in another. I fit a linear mixed effects model comparing $Y$ in each condition. Here's a ...
-1
votes
0answers
10 views

Can the estimate of a beta be increased (overestimated) due to multicollinearity with other predictors?

Let's assume that we have a predictor x0 that normally has an effect on our dependent variable y (in this case, RT), but we want ...
0
votes
0answers
21 views

Aside from switching to a Bayesian approach, how can I quantify the strength of evidence for a null result of a linear mixed effects model?

I've run a linear mixed effects model with a null result that would be quite interesting for the field. Is there a test I can run that would bolster the claim that the two groups are indeed equivalent?...
0
votes
0answers
14 views

Compare factor levels from a factor which is both within and between subjects

I have a data frame from an experiment in which subjects rated the beauty of landscapes on a continious scale from 1 to 10. My data frame looks something like this: ...
2
votes
0answers
52 views

In MIXED models for RM, is it necessary to include interaction effects between covariates and time?

I am currently analysing data of a cohort study where we try to model change in a dependent variable (say, academic grades) over three time-points based on a number of continuous independent variables....
0
votes
0answers
6 views

What is the best approach to GLMER with Lme4? Step 1. Choose Error Strucutre, Step 2. Build the simplest model, Step 3 start building it up? [closed]

I am just looking for a sanity check (and to be pushed in the right direction) - I would be very thankful if someone could provide some clarity. I am running some statistical analysis in R using Lme4,...
0
votes
0answers
5 views

Means and standard deviation of factor levels in mixed models

I have a response variable (ovs.m <-number of UV-reflecting scales on a lizard individual) and a factor with five levels (Morph: o, ow, w, y, yo). Using Rmisc, I can summarise the mean, sample size,...
4
votes
1answer
73 views

Multilinear regression

The following code fits multi-linear regression model and produces coefficients that I don't quite know where they come from. ...
1
vote
0answers
7 views

How can Degrees of Freedom increase for Mixed Effects Model Comparison w/ Chi Square?

I'm using lme4 for mixed effects linear regression, and I'd like to compare two models using anova(). However, I'm perplexed by ...
2
votes
0answers
41 views
+150

Two sample test clustered data, continuous variable with zeros

I have a situation where an experiment is being run in the following manner: A one stage cluster sampling (I think this is accurate description ) is conducted whereby there are multiple organizations ...
0
votes
0answers
20 views

Will Cholesky decomposition help linear regression?

I am really confused how the cholesky decomposition has helped to simplify the penalized least squares error in the following paper. https://arxiv.org/pdf/1406.5823.pdf Plz look through eqn (14-19)....
1
vote
1answer
39 views

Why do I get a massive drop in AIC/BIC when adding a main effect that isn't even significant?

I have no explanation for this. Note how "school" isn't significant, yet the model with only that main effect has a much lower AIC (and BIC) than the one with time, intervention, and intervention*time ...
0
votes
0answers
20 views

Random effects in gamlss

I have a question regarding the gamlss package. I am attempting to fit a mixed effects model using the Befa Inflated distribution as follows ...
0
votes
0answers
5 views

Longitudinal data Random effect of time 0 - meaning?

I have longitudinal data collected at three waves (in 2004, 2007 and 2011). The three waves have decreasing sample size, because is a follow up cohort study. I am interested in investigating the ...
0
votes
0answers
10 views

Use a two-way repeated measures ANOVA when we have two independent groups

Our study consists of two independent groups named as EXPT and CTRL. There are 10 subjects in each group, and measurements at two points: pre and post test. Can we use a two-way repeated measures ...
2
votes
0answers
26 views

GLMM model validity

I have fitted a glmm model using glmmTMB and DHARMa packages in R. The model is pretty perfect: neither overdispersed/zero-inflated or spatially autocorrelated. And the qq plot of observed vs. ...
1
vote
0answers
39 views

Analyze similarity matrix using linear mixed model

Let's say I have a similarity matrix where every subject is compared to every other subject on some similarity measure (e.g., body movement synchrony). These subjects are divided into two groups, say ...
5
votes
0answers
35 views

Basic doubt - dummy code vs. hierarchical model

I have a basic doubt on when to use country code as dummy coded control variables in regression and when to model it as a higher level variable within which other independent variables are nested. In ...
3
votes
2answers
117 views

mlogit package fails to recover synthetic mixed logit model

I am generating data from the following synthetic mixed effects model for the utility of agent $h$ choosing transportation mode $j$: $U_{hj} = \beta_{\text{price}} X_{h,\text{price}_j} + \beta_{\text{...
3
votes
1answer
23 views

How does pooling work with crossed effects in multilevel models?

In Section 12.2 of Gelman and Hill, The authors mention that one of the main benefits of creating a multi-level model is that you can take advantage of "partial pooling". As an example, if you were ...
0
votes
2answers
34 views

Is this linear model overfitting when I add more parameters?

I am trying to figure out if my models are overfitting. This is a trend I noticed with my actual dataset associating metadata with compositional data. The more parameters I add, the better the ...
0
votes
1answer
18 views
0
votes
0answers
21 views

When is it OK to calculate the AUC for a mixed-effects logistic regression model without the random intercept?

I fit a mixed-effects logistic regression model in R with glmer. There is one dependent variable, one dichotomous predictor variable, and one random intercept. The ...
0
votes
0answers
13 views

Multivariate mixed model, lmer/mcglm

I'm struggling to find a way to analyse my data. The design is: Two response variables: liking, perceived threat (of immigrant groups) random factor: target group (economic migrants, refugees) fixed ...
0
votes
0answers
22 views

How to estimate mixed logit (or random parameter) discrete choice models in R

I have designed a discrete choice experiment to estimate WTP figures for a non-market good within a group where I think preference is heterogeneous. But I am currently struggling to estimate the model....
0
votes
0answers
20 views

Degrees of freedom using nlme

I'm having a very similar issue to this post: Degree of freedom with mixed model , using nlme package? But unfortunately the post does not contain a real answer. I am not understanding how the nlme ...
0
votes
0answers
20 views

How to deal with measurement points that are not equally distributed over time when analysing data with linear mixed models?

A variable is measured repeatedly within a study (e. g. blood sugar levels every day over the course of two weeks while patients are giving a specific treatment). There are also two follow-up ...
4
votes
0answers
46 views

Do results from the lme-function require adjustment of p-values?

If I run a linear mixed model with the lme() function and get results like these (comparing the score of 4 treatment groups against a placebo group): ...
1
vote
1answer
45 views

Linear mixed-effects model equation for correlated and uncorrelated random slopes

I've been asked to provide a linear equation for a lme4:lmer() model that I report in one paper. I tried to adapt examples from http://rpsychologist.com/r-guide-...
2
votes
1answer
36 views

Can a random slope in a linear mixed model mask the effect of my intervention?

I want to assess the impact of my intervention in a repeated-measures design. I have subject as a random intercept in order to account for the dependence of measurements within subjects: ...
0
votes
0answers
26 views

Mixed Model ANOVA or Multiple Paired Sample T test?

I'm currently working on my research and this is the design: The aim of the research is to investigate the effectiveness of mindfulness on subjective wellbeing and perceived stress. So, 100 ...
0
votes
0answers
11 views

How to calculate required sample size for nested 2x8 repeated measures design?

I need to calculate the sample size required for a 2x8 repeated measures design in which variable B ("condition", 8 levels) is nested in variable A ("stim", 2 levels). In our previous analysis, we ...
0
votes
0answers
8 views

performance issues with linear mixed model

I am fitting a linear mixed model $y_{t} = \beta_0 + \beta_1x_{1t} + \beta_2x_{2t}+ \beta_{0i[t]} + \beta_{1i[t]}x_{1t} + \beta_{2i[t]}x_{2t} + \beta_{0j[t]} + \epsilon_t$ with ...
0
votes
0answers
7 views

Specification of partially nested / partially crossed longitudinal 3-level model

I am analyzing how properties of brain hemispheres change over time under different conditions. Each subject has a left (L) and a right (R) hemisphere for each of which I measure the property of ...
0
votes
0answers
5 views

Mixed Fractional Factorial analysis

What is the most appropriate way to analyse a mixed fractional factorial design? It's a fairly typical 3 x 3 x 3 x 2 factorial structure, but due to obvious constraints the researchers created 12 ...
1
vote
0answers
26 views

Two-way MANOVA - No significant multivariate interaction - can I still interpret univariate interaction?

Assume that a two-way mixed (two independent variables (IVs)) MANOVA was conducted. The multivariate interaction effect of the two IVs on the dependent variables (DPs) together was not significant. ...
9
votes
0answers
187 views

Compute partial $\eta^2$ for all fixed effects anovas from a lme4 model

Disclamer: I wasn't sure where to post this question: CV or SO, but eventually decided to try here first I've been asked by one of the reviewers to add effects sizes (preferably $\eta^2_p$ which is ...
1
vote
0answers
14 views

Random effects with dummy variables

In specification of a Linear Mixed Model (LMM) I encountered an issue with specifying the model, specifically the random effects. I fear I don't know whether the issue is about model specification in ...
0
votes
1answer
25 views

Variable selection in mixed effect models (stepAIC followed by dredge followed by model averaging)

I have simple mixed model of the form: fit <- nlme:::lme(fixed= Outcome ~ Var1+Var2+...+Varn, random=(1|cluster), data=data) i have n=37 environmental ...
0
votes
0answers
9 views

Multilevel repeated measures design

How does one model a series of FIXED stimuli within a repeated measure design? Our design measures a subjectively measured continuous outcome (the dv) at 4 different points in response to a sequence ...
2
votes
1answer
31 views

Interpreting a main effect, in the presence of an interaction

In my analysis I have subjects whose blood pressure is measured across time, for two dose conditions (control and drug). I have used a linear mixed effect model and plotted best-fit lines of the BP ...