All Questions
2,982 questions
5
votes
2
answers
211
views
Choosing a linear model to take into account multiple observations from the same individuals
I’m looking at how temperature varies across age. Can you help me to choose the most appropriate linear model to this analysis?
I’ve got multiple measures from 1 individual per age (13 in total), and ...
5
votes
3
answers
276
views
Counting Biased Coins
Edit Note:
While this question is very interesting and relevant in its own right, I have come to a realisation that I have to make it a bit more complicated in order for it to be applicable to my ...
5
votes
2
answers
1k
views
Using random effects to adjust for cluster-level confounding?
There is a usage of random intercepts to adjust for unobserved cluster-level confounding, as for example argued here:
Are random effects confounding variables?
How do random effects adjust for ...
5
votes
1
answer
343
views
GLMM, introducing weight variable changes Pseudo-R^2 but not AIC
Here is a reproducible example using R, where I noticed that adding a uniform weight value to a glmm,the AIC of models stay the same but Pseudo R^2 gets reduced a lot. Why?
...
5
votes
1
answer
1k
views
What is the difference between GLMMs and MLMs
Generalized Linear Mixed Models (GLMMs) and Multilevel Models (MLMs) seem to sometimes be used in similar contexts.
What is the difference between the two.
Can both be used for hierarchical linear ...
5
votes
1
answer
3k
views
Binomial GLMM: Model validation & ceiling effect
My data has a binary response acc(correct/incorrect), one continuous predictor score, three categorical predictors (...
5
votes
1
answer
233
views
Multilevel Model or Simple Correlation Coefficients
I am interested in the relationship of several variables (questionnaire score = q1 (0-24); physiological measures = phys) across consecutive conditions (block = 4 consecutive conditions) and between ...
5
votes
1
answer
165
views
Intercept interpretation in multi-level model when first-level predictor discrete
This is the experimental setup:
1 dependent variable (discrete, 4 levels) and
3 Independent variables:
Time, measured within subject, 5 discrete levels
Covariate, measured within subject, 5 discrete ...
5
votes
1
answer
2k
views
p-value random effect in glmer() in lme4 package
I know that in order to test whether a random effect has a significant impact on a model it's necessary to sequentially remove one random effect at a time and check each model pair with ...
5
votes
2
answers
6k
views
Overdispersion parameter in R's glmmTMB
I am using R's glmmTMB for modeling negative binomial mixed effects. In the output, I see the following line : ...
5
votes
1
answer
2k
views
Poisson glm for rank or score data?
I have a question about analyzing a dataset that I'm currently working with. Each row of the dataset represents an individual songbird, and its reproductive success over the course of a breeding ...
5
votes
1
answer
3k
views
Understanding the multilevel / random-effects beta-binomial regression model
Suppose we have an outcome variable $y_{ji}$ which is a count of behaviors performed by group $j$ in round $i$, for $j = 1,...,n$ and $i = 1,...,8$. The outcome $y_{ji}$ counts are non-independent ...
5
votes
1
answer
75
views
How to translate hierarchical linear model random effects into SEM path diagram?
I've been struggling with translating random slope and intercept and random variables and understanding them as latent variables in the pursuit of path models.
For example here is a random slope and ...
5
votes
1
answer
1k
views
Changing the time metric for longitudinal data
I have some longitudinal data. I've done longitudinal analysis before but I have never changed the time metric so I wanted to run the process of that by you.
Edits for clarity:
I have repeated ...
5
votes
2
answers
379
views
Multilevel models for groups that have different predictors
Imagine I am trying to fit a multilevel model on products, and want to group by product type.
In cases where product types have all the same predictors this is straight-forward. E.g. you might ...
5
votes
1
answer
4k
views
How to select the family for a GLMM with non-normal, continuous data and lots of zeros
I'm new to using glmer's in the R package LME4.
I want to run a repeated measures GLM for my data. The data is looking at a readout of an accelerometer and correlating to behaviour- so the readout has ...
5
votes
1
answer
244
views
Book recomendation introducing multilevel models for a pure mathematician
Is there a good book on Multilevel models (random intercept, random slope, fixed effects, etc.) written for mathematicians which treat the theory rigorously?
My background is essentially is in the ...
5
votes
1
answer
548
views
How to interpret main effect with two interaction terms?
I have three variables in a multilevel model:
Relationship Status (0 = single, 1 = not single)
Living Arrangement (0 = alone, 1 ...
5
votes
1
answer
1k
views
Are time points nested in students or crossed in a longitudinal multi-level model
I often hear that in a longitudinal multi-level analysis, time points (as a fixed factor) are "nested" within students (e.g., just search the word $nest$ in this paper).
However, this great ...
5
votes
1
answer
2k
views
What does it mean when a low number of quadrature points gives a very different GLMM fit?
I am interested in a logistic regression model with 10 fixed-effects parameters and random intercepts, which I can fit using the lme4::glmer function in R. The ...
5
votes
1
answer
1k
views
$R^2$ for mixed models = ICC?
I will be referring here to Nakagawa and Schielzeth (2013). As those authors state, $R^2$ for OLS regression could be defined as follows:
$$R^2 = \frac{\sum^n_{i=1}(\bar{y} - \hat{y_i})^2}{\sum^n_{i=...
5
votes
1
answer
1k
views
Misspecified levels in multilevel mixed logit model
I'm estimating a couple 3 level logit models using Stata 12 and am faced with a dilemma about how (or if) I should specify my third level.
The data is court cases nested within judges nested within ...
5
votes
1
answer
124
views
Testing for the effect of an intervention when it is applied on a group of which each individual is measured
Suppose we have 500 students nested in 20 classes (different classrooms), 25 students per class
student<-factor(1:500)
class<-rep(LETTERS[1:20],each=25)
...
5
votes
1
answer
3k
views
Multi-stage selection model with panel data in R
My data consists of individual level observations nested within countries over time. I would like to use multilevel models along with some sort of selection model.
I have three related questions.
...
5
votes
2
answers
107
views
Repeated measures within participant
I'm trying to learn linear mixed effects models and how to estimate them using the R package lme4 and I am confused about some aspects.
I have a dataset where a ...
5
votes
1
answer
913
views
Between- and within-person level effects when using multilevel modelling for longitudinal data in R
I’m using nlme package in R for analysing longitudinal data. The aim is to understand if changes in need satisfaction (TNS) and ...
5
votes
1
answer
1k
views
Dealing with heavy-tailed residuals when fitting hierarchical linear models using lme4
This is my first time posting, so please excuse any issues with respect to my description of the problem and the presentation of the data and code I have supplied.
Summary of the Design
30 listeners ...
5
votes
2
answers
2k
views
Standard deviation as dependent variable inside a HLM
I'm not a statistician so maybe my question is very simple but I've encountered some difficulties reading a statistical method in a cognitive psychology paper.
Basically the dependent variable to ...
5
votes
1
answer
718
views
How to interpret intercept (and coefficients) in a GLMM with gaussian family and log link?
I am working with some bounded continuous data (between 1 and 10), which I think means I should be using a log link for my GLMM. In my reading for interpretation, it look like putting the effects (...
5
votes
1
answer
1k
views
Reconciling various definitions of Variance Components
In the context of multilevel modelling, Field (2013) p. 827 provides the following representation of a variance-covariance matrix to illustrate Variance Components
and writes
This covariance ...
5
votes
1
answer
690
views
Calculating variance components and ICC of a random intercept model by hand
When I really want to understand a measure or parameter, I tend to do the calculation by hand with simplified data. Today I have attempted to do the same with the ICC, but somehow keep failing. I was ...
5
votes
1
answer
8k
views
Assumptions of multilevel analysis
In response to another question StasK writes:
In multilevel analysis, you have to make strong assumptions: (i) that
your random effects are normal (or, if you have random slopes as long
as ...
5
votes
1
answer
4k
views
Why are results different between MuMIn::r.squaredGLMM and piecewiseSEM::sem.model.fits?
MuMIn::r.squaredGLMM and piecewiseSEM::sem.model.fits should be preforming the same calculations. They are implementing Schielzeth and Nakagawa's R2 for generalized linear mixed effects models. ...
5
votes
2
answers
4k
views
Does the VIF make sense for a model with categorical variables?
I'm trying to detect multicollinearity in my model, it has count response variable and some proportional and one categorical explanatory variable called site. In R the model looks like this:
...
5
votes
1
answer
3k
views
Diagnostic plots for lmer
I am trying to produce a glmm using the lme4 package in R. To validate my model I would like to produce some diagnostic plots ...
5
votes
1
answer
416
views
Variant of discriminant analysis for known multiple independent classifications?
I have a large data set: over 100,000 data points, each with 60 dimensions. I want to display the data in 2D to visibly maximize the separation between classes, which I know for each point. I asked a ...
5
votes
1
answer
230
views
GLM modeling binomial proportions with varying trials and probabilities
A collection of coin manufacturers, $m$, each produces a line of coins, the number of which varies by manufacturer (some produce 3 types of coins, others make 7, and so on). Each manufacturer imparts ...
5
votes
1
answer
587
views
What is a two-stage regression, as a prelude to multilevel modeling, concretely?
I would like to fit some multilevel models to my data. In several places Dr. Gelman has suggested that one can fit a two-stage regression as a prelude to a multilevel model, to see if a more flexible ...
5
votes
1
answer
483
views
How to do classification in mixed effect models in python. My data is nested into groups with binary outcome
Lets say I have 10 sellers (S1-S10). Each seller has 7 buyers which are different for each seller (B1-B7 for S1, B11-B17 for S2 and so on). Each Seller buyer combination has a product category (P1, P2....
5
votes
1
answer
3k
views
Factor analysis with repeated measures
Multilevel factor analysis seems to be the technical term for factor analysis with repeated measures, judging from this abstract. To be precise, following Wikipedia's factor analysis notation, the ...
5
votes
1
answer
4k
views
Multiple weights in multilevel models
I am currently working on a random intercept multilevel model using the European Social Survey round 6 dataset. It is a 2-level model with individuals (level 1) nested within countries (level 2). To ...
5
votes
1
answer
79
views
Method/workflow for analyzing data with changing structure?
I am analyzing data relating to networks that evolve over times (more precisely, a snap shot of the network at every discrete time step). Each node of the network denotes a person who perform some ...
5
votes
1
answer
3k
views
Interpreting interaction effects in a multilevel model
I conducted a multilevel analysis using repeated measures across four time points. The model contains intercept, linear slope and quadratic slope. I am interested in examining the extent to which ...
5
votes
1
answer
477
views
Multi-stage sampling together with hierarchical/ mixed effects models: which R packages?
Analyzing educational datasets we have samples of children from samples of class in samples of schools - we have sampling weights, so I use the survey package e.g. to do a linear model. But this kind ...
5
votes
1
answer
1k
views
Fitting constrained hierarchical models in JAGS
I have been doing some research on constrained models and have recently read the paper:
Gunn and Dunson (2005) "A Transformation Approach for Incorporating
Monotone or Unimodel Constraints", ...
5
votes
1
answer
10k
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: ...
5
votes
0
answers
126
views
Nested mixed effects model- am I missing an additional random effect?
Let's suppose that data is collected for clinics across the state. The clinics are located in different counties, but also some of the clinics are owned by large healthcare systems that are located in ...
5
votes
0
answers
250
views
Calculating ICC for a beta-binomial GLMM
I understand that ICC in binomial GLMMs with a logit link can be calculated via R, where the residual deviance is (pi ^ 2) / 3. However, this is assuming that the ...
5
votes
0
answers
390
views
Interaction plot between categorical and quadratic continuous variable
I ran a GLMM model with a binomial response to analyse bear presence at feeding sites (0 = absent, 1 = present) within two years. My code is:
...
5
votes
0
answers
309
views
How can I find and categorise the effect size of a single coefficient in a multiple regression?
Question
How do I find the effect size for the different hierarchical multiple-level regressions used by papers in my review? And how do I categorise their effect size?
Detail
I’m publishing a ...