We’re rewarding the question askers & reputations are being recalculated! Read more.

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
632 views

Generalized Linear Mixed Effects

When to use multivariate logistic regression versus generalized linear mixed-effects models? What is the difference between the two? Edit (in response to comments): I was hoping to see multivariate ...
5
votes
1answer
1k views

Interactions between non-linear predictors

I have data on 70,000 students, nested in 120 schools. I'm starting with fixed effects for the schools, but at some point I might start letting intercepts and slopes vary. Some key predictors (e.g....
10
votes
2answers
6k views

Comparing a mixed model (subject as random effect) to a simple linear model (subject as a fixed effect)

I am finishing up some analysis on a large set of data. I would like to take the linear model used in the first part of the work and re-fit it using an linear mixed model (LME). The LME would be very ...
1
vote
1answer
2k views

How can I specify a level of a factor while in an lme?

I have a dataset with repeated measures at different speeds. I've binned the speed ranges into 0-0.5, 0.5-1.5, and 1.5-infinity. ...
7
votes
1answer
3k views

Clustered standard errors and multi-level models

Stata allows estimating clustered standard errors in models with fixed effects but not in models random effects? Why is this? By clustered standard errors, I mean clustering as done by stata's ...
4
votes
1answer
177 views

How to replicate large well powered mixed effects model with a smaller sample?

Some edits made... I have a dataset which other researchers have used mixed effects modelling with to come up with a nice set of associations. I also have a much smaller dataset which is the same ...
9
votes
2answers
1k views

Am I specifying my lmer model correctly?

I've scoured Google and this site and I am still confused about the lmer function in the lme4 library. I have some data collected from different psychiatric wards, which have a multilevel structure. ...
6
votes
2answers
1k views

Analyzing a 2x3 repeated measures design using a logit mixed model

An experiment I conducted recently used a 2 (between participants) x 3 (within participants) design. That is, participants were randomly allocated to one of two conditions, and then completed three ...
7
votes
1answer
1k views

What is the default covariance structure in glmer and can I change it?

For R, I understand that the package lme4 and the function glmer roughly corresponds to glimmix in SAS. What is the default covariance structure when fit and can it be changed? If so how?
17
votes
2answers
13k views

Proportion of explained variance in a mixed-effects model

I do not know if this has been asked before, but I do not found anything about it. My question is if anyone can provide a good reference to learn how to obtain the proportion of variance explained by ...
13
votes
3answers
10k views

What is the difference between using aov() and lme() in analyzing a longitudinal dataset?

Can anyone tell me the difference between using aov() and lme() for analyzing longitudinal data and how to interpret results ...
31
votes
4answers
15k views

How do I fit a multilevel model for over-dispersed poisson outcomes?

I want to fit a multilevel GLMM with a Poisson distribution (with over-dispersion) using R. At the moment I am using lme4 but I noticed that recently the ...
9
votes
3answers
2k views

How can I speed up calculation of the fixed effects in a GLMM?

I'm doing a simulation study which requires bootstrapping estimates obtained from a generalized linear mixed model (actually, the product of two estimates for fixed effects, one from a GLMM and one ...
7
votes
1answer
2k views

Conducting planned comparisons in mixed model using lmer

When deconstructing my mixed effects model, I found a three-way significant interaction. I calculated my p-value by using maximum likelihood ratio tests allowing for a comparison of the fit of the two ...
4
votes
2answers
363 views

Modeling vacancy rate

I have 100 geographical regions in a country. For each region the total number of houses and the number of vacant houses have been collected yearly over 20 years. I have also some other economic ...
5
votes
2answers
2k views

How to fix the threshold for statistical validity of p-values produced by ANOVAs?

I have run experiments on a group of users under two conditions, measuring the time it took users to finish their experiments. I used a cross-over design where half of the users started in the first ...
4
votes
1answer
266 views

How can I treat blocks in a split plot design?

In a field experiment involving crops, what is the difference in considering block as random or otherwise as fixed factor? As far as I understood, random means that conclusion can be extended to other ...
5
votes
1answer
5k views

GLMM output interpretation (correct text)

I used the lmer function in the lme4 package in order to assess the effects of 2 categorical fixed effects (1º Animal Group: ...
2
votes
1answer
611 views

What is my model statement for mixed models (nlme) in R?

I want to know if a covariate for each subject interacts with three types of trials, and the difficulty of those trials. My dependent measures are accuracy and response times (RT). For this question, ...
6
votes
2answers
450 views

Taking advantage of many pre-treatment measurements

I am planing a pre-post treatment-control design study with a large number of pre-treatment measurements. I have subjects divided into a control group and a treatment group. For both groups, I will ...
12
votes
2answers
6k views

How can one do an MCMC hypothesis test on a mixed effect regression model with random slopes?

The library languageR provides a method (pvals.fnc) to do MCMC significance testing of the fixed effects in a mixed effect regression model fit using lmer. However, pvals.fnc gives an error when the ...
18
votes
3answers
2k views

Pitfalls of linear mixed models

What are some of the main pitfalls of using linear mixed-effects models? What are the most important things to test/watch out for in assessing the appropriateness of your model? When comparing models ...
85
votes
4answers
45k views

How to choose nlme or lme4 R library for mixed effects models?

I have fit a few mixed effects models (particularly longitudinal models) using lme4 in R but would like to really master the ...
4
votes
1answer
4k views

Interpreting correlation from two linear mixed-effect models

I have a linear mixed-effect model which I hope will answer the question of whether an increase in the frequency of use of one word leads to an increase of the frequency of use of that word by another ...
6
votes
3answers
5k views

How do I setup up repeated measures data for analysis with nlme()?

I'm trying to transition to R from using SPSS. In the past, I've setup my data in the wide format for my repeated measures ...
3
votes
1answer
2k views

Interpreting size and direction of fixed effects in a linear mixed effect model

I have some data which, after lots of searching, I concluded would probably benefit from using a linear mixed effects model. I think I have an interesting result here, but I am having a little trouble ...
31
votes
1answer
33k views

Multiple comparisons on a mixed effects model

I am trying to analyse some data using a mixed effect model. The data I collected represent the weight of some young animals of different genotype over time. I am using the approach proposed here: ...
5
votes
2answers
594 views

Generalization of the Signal-Noise ratio for non-Gaussian processes

The signal to noise ratio is simple, and is usually defined in the context of simple Gaussian local-level models. In the cause of non-gaussian signal or noise models, do people do things more ...
3
votes
2answers
5k views

Confidence-intervals for conditions tested with a mixed-effects model

Sorry for a possibly ignorant question. I have fit a mixed-effects model using the lmer function from the lme4 package, and the main fixed effect (a factor with three levels) in the model was ...
11
votes
3answers
3k views

Effect size for interaction effect in pre-post treatment-control design

If you choose to analyse a pre-post treatment-control design with a continuous dependent variable using a mixed ANOVA, there are various ways of quantifying the effect of being in the treatment group. ...
7
votes
4answers
7k views

How to test random effects in a multilevel model in R

I have been reading a good book called Applied Longitudinal Data Analysis: Modeling Change and Event Occurrence by Judith Singer and John Willet. The book shows that by modeling in 2 levels, we can ...
7
votes
1answer
1k views

Why do I get equal AIC, BIC and log likelihood for different models in LME framework?

I have two LME models with the same interaction, one containing both main effects and one containing only one main effect, say : $$ H\_CE = Season + Crownlevel + Season:Crownlevel , random = 1|...
5
votes
1answer
465 views

How to setup a laboratory experiment in Ecological Research under high natural variability

I am about to do a laboratory experiment in the scientific field of soil ecology and hydrology. Beforehand I want to make sure not to make any crucial mistakes, and therefore I would appreciate any ...
271
votes
9answers
502k views

What is the difference between fixed effect, random effect and mixed effect models?

In simple terms, how would you explain (perhaps with simple examples) the difference between fixed effect, random effect and mixed effect models?
5
votes
1answer
2k views

How many data points do we need for mixed effects longitudinal data?

I am collecting longitudinal data using for 4 time waves. Although the survey is administrated to the same population, different individuals may decide to complete it at each time point. As a result ...
2
votes
1answer
1k views

Fitting GAMM model in R

when fitting GAMM with R, I would like to know why when the smooth function is linear, the confidence interval is zero around the middle (the dotted lines are crossing each other at the middle)
18
votes
5answers
17k views

Using lmer for prediction

Hello I have two problems that sound like natural candidates for multilevel/mixed models, which I have never used. The simpler, and one that I hope to try as an introduction, is as follows: The data ...
7
votes
1answer
365 views

Assessing linearity in a mixed effects model

I have developmental data collected across several grades (1-6), where each child in each grade is measured many times. I would like to be able to assess whether there are any linear or non-linear ...
17
votes
1answer
15k views

Unbalanced mixed effect ANOVA for repeated measures

I have data from patients treated with 2 different kinds of treatments during surgery. I need to analyze its effect on heart rate. The heart rate measurement is taken every 15 minutes. Given that ...
11
votes
1answer
155 views

Two years of data describing occurence of violence- testing association with number of patients on ward

I have two years of data which looks basically like this: Date ___ Violence Y/N? _ Number of patients 1/1/2008 ____ 0 __________ 11 2/1/2008 ____ 0 _________ 11 3/1/2008 _____1 ...
4
votes
2answers
5k views

Random effect slopes in linear mixed models

In my data, the RT (gaze) of individuals (ID) is examined as a function of a visual conditions, the factor size (small, medium, large). Base model: ...
7
votes
2answers
1k views

Forecasting unemployment rate

I have a data set of 100 geographic regions for which the unemployment rate has been observed during the last 9 years. Now, I want to simulate/forecast from this data the next year unemployment rate ...
15
votes
4answers
3k views

Comparing mixed effect models with the same number of degrees of freedom

I have an experiment that I'll try to abstract here. Imagine I toss three white stones in front of you and ask you to make a judgment about their position. I record a variety of properties of the ...
4
votes
1answer
2k views

Mixed effects log-linear models

There are occasions where I would like to fit log-linear models where the independence assumption between observations is violated. It is the normal case that I have multiple observations from each ...
20
votes
3answers
3k views

How to combine confidence intervals for a variance component of a mixed-effects model when using multiple imputation

The logic of multiple imputation (MI) is to impute the missing values not once but several (typically M=5) times, resulting in M completed datasets. The M completed datasets are then analyzed with ...
4
votes
2answers
2k views

Confidence intervals on differences in choices in a GEE framework: methods and alternatives?

Say we have 5 items, and people are asked which item they like. Multiple answers are possible, but also no answer is possible. The people are categorized according to factors like gender, age, and so ...
5
votes
1answer
2k views

Checking assumptions for random effects in nested mixed-effects models in R / S-Plus

I am modelling a nested mixed-effects model with just the intercept in the random part, of the form: ...
14
votes
4answers
5k views

Follow up: In a mixed within-between ANOVA plot estimated SEs or actual SEs?

I am currently finishing a paper and stumbled upon this question from yesterday which led me to pose the same question to myself. Is it better to provide my graph with the actual standard error from ...
36
votes
8answers
20k views

Under what conditions should one use multilevel/hierarchical analysis?

Under which conditions should someone consider using multilevel/hierarchical analysis as opposed to more basic/traditional analyses (e.g., ANOVA, OLS regression, etc.)? Are there any situations in ...
14
votes
2answers
3k views

What would a confidence interval around a predicted value from a mixed effects model mean?

I was looking at this page and noticed the methods for confidence intervals for lme and lmer in R. For those who don't know R, those are functions for generating mixed effects or multi-level models. ...