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.

learn more… | top users | synonyms (3)

0
votes
0answers
3 views

Specifying glmer response variable

Any idea about why the following model specifications should give different fits? Let's say we have the same data in the following two formats- head(data_long) ID correct condition itemID ...
1
vote
0answers
10 views

How to model my data with linear mixed models for contrasts analysis

I have a dataset containing one dependent variable which is the concentration of antibiotic needed to kill a bacteria, which was measured for several different antibiotics for three different ...
0
votes
0answers
11 views

How to put nested random effects and crossed random effect together inside in a nlme model?

In my model I have few covariates. Also I want to include the random effects state, county and ...
2
votes
2answers
21 views

linear mixed effect model, can I have fixed effect and random effect from a same source?

Say I sampled 50 schools and take 20 students from each school. I randomly give 10 in each school concentration enhancement treatment. For each school, I also have the school's teacher-student ratio....
1
vote
1answer
33 views

Trouble setting up a linear mixed effects model

Suppose I have two continuous predictors (A, B) and a categorical predictor (Subject) of a continuous dependent variable (C). Predictor A is directly manipulated in the experiment, and is identical ...
0
votes
0answers
7 views

Using an LMM for whole set of data vs using ANOVA for subsets

I did an experiment where I presented animals with 2 different stimuli over 3 different time periods. I'm interested to see if they show a statistically significant difference in response to the two ...
2
votes
1answer
37 views

Random effects with random slopes and intercepts LMM

Let's say we have two models specified by the following formulas in R's lmer(): i) Y ~ A + B + (A:B|SUBJECT) ii) ...
2
votes
1answer
49 views

Mixed effects meta-analysis using metafor package in R

I would like to meta-analyse raw mean differences (MDs) in systolic blood pressures (BPs) according to soda intake (i.e. drinkers vs. non-drinkers). The problem is that there are important differences ...
0
votes
0answers
7 views

Multilevel mediation with dichotomous outcomes but continuous mediator

I want to do a mediation analysis in R on multilevel data where the treatment and mediator are group-level variables while the outcome is recorded at the individual level. The documentation ...
1
vote
1answer
24 views

Specifying Error() in R `aov` function

Consider a data where samples from different populations of 5 species are analyzed after 4 treatments at 3 time intervals. So the independent variables are ...
1
vote
0answers
38 views

predict function is underestimating in cases where polynomials are included in an lmer model

I have been having trouble with the predict function underestimating the predictions from an lmer model with some polynomials. Hopefully my edits make it clearer. I have scaled data that looks like ...
0
votes
0answers
4 views

Summing mixed models regression coefficients

Let's say i have 3 variables. Food, toys and clothes, measuring my big family's expenses. I have tons of observations but my damn kids are horrible bureaucrats, hence i have a lot of missing data. ...
1
vote
0answers
6 views

what is the estimated variance of predictions from mixed model?

I have fitted the following lmer model (assume it is "correct") with lme4: Y ~ X1 + X2 + X3 + (1 | year) + (1 | site) + (1 | site:year) where X1-X3 are ...
0
votes
0answers
21 views

How to convert SAS model to lme4 model?

I want to run a linear mixed model on a dependent variable DV that is collected under two different Condition at three different ...
0
votes
0answers
5 views

How to export a formula from a SAS model

I am a bit of a SAS novice so please forgive my ignorance. I have a generalized Linear mixed model in SAS based on past data but I don't know how to export it to a pure mathematical formula that ...
0
votes
0answers
27 views

Test for repeated measures with large numbers of missing values

I have a number of independent continuous variables, such as HbA1c, waist circumference, total cholesterol measured in approximately 300 people over various time points (baseline, 3, 6, 12, 24 months ...
3
votes
0answers
21 views

Is it possible to calculate a pseudo-R squared for a binomial GLMM with a cauchit link?

I'm modeling some repeated-measures presence-absence data using a binomial GLMM in lme4. I've been using the method suggested by Nakagawa and Schielzeth (2013) to calculate a marginal and conditional ...
1
vote
1answer
23 views

Three-level mixed effects model with crossed effects in Stata [on hold]

I have a dataset of individuals that includes their wage and occupations for several years. The data is in panel (long) format (xtset id year, yearly). I want to ...
3
votes
0answers
28 views

Can you create a mixed effects General Additive Model?

I'm facing a challenge with how to apply a GAM to a dataset. I'm using network data, pretend for the sake of specificity, between individuals. I'm interesting in the relationship between team size and ...
1
vote
0answers
36 views

Linear Mixed Effects Models - combining coefficients

Suppose I have a sample of height data for a population with sex and region identifiers. Now, suppose I estimated the linear mixed model against a variable $x$. I'm using the ...
1
vote
0answers
19 views

how to plot a binomial glmer with two binomial predictors?

I have a response variable called Percieved Personality (responsible-sympathetic) predicted by Birth Order (Firstborn-Laterborn) interacting with Sex (Male-Female), with 2 random effects. I just want ...
2
votes
0answers
29 views

Specifying and extracting random intercepts and slopes from GAMM using bam in mgcv

I have two questions about how to specify random effects structures in mgcv using bam. I'm using bam because I have a large data set (~15,000 data points) that consists of interviews with different ...
1
vote
0answers
22 views

How to interpret and report significant glmmADMB interaction term?

I am analyzing a data set using glmmADMB and determining significance of variables using likelihood ratio tests to compare models with and without a given variable. ...
0
votes
0answers
22 views

Linear mixed models with two random intercepts?

I have observations for individuals that live in regions $R_1,...,R_r$, and that work in regions $\tilde{R}_1,\dots,\tilde{R}_r$, where for some individuals $R_j=\tilde{R}_j$. I also have a number of ...
2
votes
0answers
54 views

machine learning techniques for longitudinal data

I was wondering if there were any machine learning techniques (unsupervised) for modelling longitudinal data? I've always used mixed effects models (mostly non-linear) but I was wondering if there are ...
0
votes
0answers
23 views

FE and RE used simultaneousely

I am currently conducting a research aimed at finding an effect of corporate culture on stock returns (to measure the culture I performed text analysis to account for the frequency of specified bags ...
3
votes
0answers
37 views

Correlated random slopes and intercepts but non-significant random slopes. Can you have one without the other?

I am running a multilevel model. When I compare the random slope without a correlation (Model 2) model to the just random intercept model (Model 1) it is not significant (via likelihood-ratio test). ...
3
votes
1answer
51 views

Over-parameterization in Bayesian Hierarchical Model

Can someone explain the influence of adding parameters to a Bayesian model? I have read from Kruschke that Bayesian analysis 'accounts' for model complexity by way of multiple priors, however I don't ...
0
votes
0answers
6 views

Setting effect weights to sum-to-zero in linear mixed effects model with unbalanced data

I am fitting a linear mixed effects model to longitudinal data. There is a between-Subjects factor Group with three levels (Info,...
1
vote
1answer
42 views

Test significance of categorical variable with multiple levels, when model also includes interactions

I am fitting a mixed model with the command model=lmer(Activity ~ 1 + Novelty*Valence*ROI + (1 | Subject)) Activity is a measure of brain activity, Novelty and ...
2
votes
0answers
26 views

How to translate orthogonal polynomial parameters back to the original metric

I am trying to work out how the parameters from a lmer model using orthogonal polynomials can be translated back to their original metric. Chapter 5.3.3 in Hedeker, Donald, and Robert D. Gibbons. ...
1
vote
0answers
21 views

glmmLasso Warning Messages [closed]

I am trying to run glmmLasso to estimate a mixed model with the command: glm1_final <- glmmLasso(Activity~Novelty + Valence + ROI, rnd = list(Subject=~1), data = KNov, lambda=lambda[opt],...
0
votes
0answers
24 views

glmnet for mixed models? [on hold]

I perfom a lasso logistic regression using glmnet and want to account for fixed and random effects. I found R packages that can ...
1
vote
1answer
40 views

Repeated measures but not longitudinal: A case of multivariate LMM or repeated measures LMM?

I am trying to get my head around the question of what kind of model is most appropriate for the following data: Every participant rated 14 written statements in terms of various aspects (e.g. ...
3
votes
0answers
49 views

How to calculate prediction confidence intervals for estimated mixed model change scores varying per a continuous predictor, using “lme4” in R

The Setup I am employing a linear mixed model in R using the packages "lme4" and "lmerTest." In modeling my predicted variable, I have two time indicators set as fixed and random effects: one time ...
3
votes
0answers
36 views

How should I include age in this mixed-effects model?

I've got repeated measures of hearing thresholds for a set of patients who each have a different inner ear measurement. This data is unbalanced, there are a varied number of measurements at varied ...
0
votes
0answers
24 views

Estimate quantiles by mixed model quantile regression

lqmm::lqmm returns a 95th percentile lower than the 90th, using the data and parameterization below. The goal is only to estimate these upper percentiles, accounting for any within-person dependency ...
0
votes
0answers
28 views

Investigating main effect after controlling for guessing

I'm doing a multilevel logistic regression with the dependent variable being word learning scores (Score). There are two independent variables: Condition (Experimental / Control) and WordType (Cognate ...
0
votes
1answer
26 views

Significance of effects in analysis of ordinal data with cumulative link models

I'm trying to analyse some repeatead measurements where the "dependent" variable is ordinal. As far as I've understood the literature I've read so far the correct way to go is cumulative link mixed ...
7
votes
0answers
120 views

Writing out the mathematical equation for a multilevel mixed effects model

The CV Question I'm trying to give (a) detailed and concise mathematical representation(s) of a mixed effects model. I am using the lme4 package in R. What is the ...
2
votes
0answers
50 views

Crossed and nested factors in Negative Binomial Model

I am unsure as to whether I have set up the following mixed model correctly. The following are fictional data but illustrate the problem accurately. We have 32 unique subjects (a1 - a32). Each ...
1
vote
0answers
17 views

Mixed models: When can adding a predictor increase the residual variance?

I saw that Andrew Gelman had discussed this issue in one of his books, and a relevant excerpt is presented here. He also very briefly discusses this issue in his blog post here. In the book excerpt ...
0
votes
0answers
7 views

post-hoc test for multiple comparisons in a linear mixed effects model with several predictors

I have created linear mixed effects model for a dataset in which I measured bacterial loads (which is logged in the model:log_load) and the the ...
1
vote
0answers
26 views

Power analysis using lmer mixed model

I am using a mixed model in lmer to analyse some phenotype data across 3 levels of a treatment I am interested in, blocked by a random factor I am not interested in (just want to control for). So my ...
0
votes
0answers
19 views

Rsquared / R2 (i.e. R²) for Gamma-GLMM?

I have successfully calculated R²c as a goodness-of-fit measure for GLMM's using the r.squaredGLMM function implemented in R's <...
1
vote
1answer
26 views

repeated-measures linear mixed-effect model

I have two soil treatments: CT and NT. For each treatment, I have 11 CO2 measurements taken in 7 times, i.e. 11 "replicates" for 7 dates. I'd like to evaluate if the measurements are different in ...
0
votes
0answers
23 views

Mixed Models: Random effects for baseline measure

I’m currently working on a data-set where we used a diary-design. As I’ve got multiple measure points for each individual, I decided to use mixed models to analyze the dataset. Our participants filled ...
1
vote
0answers
16 views

Treatment level as random effect?

I'm trying to make sense of a SAS program that I have inherited. It uses a linear mixed model to examine the effects of applied fertilzer rate on the grain yield of corn. There are five different ...
0
votes
0answers
32 views

Forecasting with mixed frequency data

Just a general question that I couldn't find too much on. What would be some good approaches to one step ahead forecasting of financial time series with mixed frequencies? Often a lot of the ...
1
vote
1answer
26 views

Would including “year” as a categorical random effect remove a long-term trend in a mixed effects model?

I am trying to detect evidence of warming in a monthly temperature time series over a 20-year period by testing for a trend. I have precisely followed the method of Crawley (2013) The R Book, 2nd ...