Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [random-effects-model]

Parameters associated with the particular levels of a covariate are sometimes called the “effects” of the levels. If the levels that are observed represent a random sample from the set of all possible levels we call these effects "random."

880 questions
Filter by
Sorted by
Tagged with
17 views

Uncorrelated random slopes in lme4?

I am trying to fit a linear mixed effects model with a response variable (y) and two categorical predictors (x1 and x2). Part of the reproducible example for this is below, ...
21 views
+50

Modelling longitudinal data with crossed random effects

Let's say I have 40 participants. They are each measured three times. On each visit they see ten stimuli, which can be one of two types. They then get some score for each stimuli. How could I model ...
11 views

ANOVA/Chi-square analog to GEE

If repeated measures anova is analogous to random-intercepts regression and regular anova is analogous to multiple linear regression because of the F-statistic. Is GEE logit or GEE poisson or ...
10 views

How do you address a key dummy variable if you failed the Hausman test for panel data?

I have a panel model and am primarily interested in the impact of a dummy variable. Unfortunately, my model failed the Hausman test indicating that I should use fixed effect rather than random effect. ...
23 views

Interpreting VarCorr estimates versus cor(ranef()) in lme4 mixed models

I am following-up this and this thread because I found it very difficult to understand the implications of using each of the two types of random-effect correlations. In particular, I fitted model like ...
31 views

Context in which an AR(1) error term can be considered a random effect?

We have the following situation: \begin{aligned} y_t &= f(x_t)+u_t, \\ u_t &= au_{t-1}+\epsilon_t, \\ \epsilon_t &\sim N(0,\sigma^2). \end{aligned} To make it simple, let's assume $f$ is ...
14 views

Is there a distinction between the “squared semi-partial correlation” and the “semi-partial R squared” of a fixed predictor?

The package 'r2glmm' in R calculated the "semi-partial R squared" of each fixed predictor in a mixed effects model. The package describes this as "The semi-partial R squared statistic corresponds ...
22 views

comparing variance in random effects: crossed ranom effects or different models?

I am interested in making sure that a predictor I include into a regression actually explains the type of variance it should. To be more specific: in an experiment in which a number of people sees a ...
10 views

Simulate Data for Power of Random Intercepts Model

I am interested in calculating the power of a cluster randomized clinical trial of a binary intervention ($T$=1 for treated and $T$=0 for control). I have a pretty set number of candidate clusters ...
36 views

GAM model: Group-specific smoothers with different wiggliness of two random and nested factors [closed]

I aim to model the specific seasonal population fluctuations of several species. In particular, I have the abundance of individual along several years of 20 populations belonging to 5 species, and I ...
166 views

visreg visualization of mgcv results (GAM)

I fitted a GAM with random effects using mgcv, and I've noticed that the visualization of the smooths using visreg does not appear to match the output of mgcv's plots: ...
21 views

Multilevel models for panel data

I have nested Data from a Panel: individuals in regions; regions in countries. I know that fixed or random effects will account for the hierarchical structure. However, I am not just interested in ...
72 views

What exactly is meant by a singular fit of a mixed model, and why does it result in perfect correlations among random effects?

I understand a singular fit to be cases where a random effect has a variance of 0. Does this essentially mean that the model could not find a variance parameter for the random effect that did better ...
51 views

Modelling proportion data using GLMMs

I am having some trouble finding the correct way to analyse some data. I am trying to determine whether a certain treatment had an effect on frog calling. Frog calling was measured as presence or ...
66 views

Why is $R^2$ so difficult to calculate for mixed models (both for the model as a whole and the fixed effects)? [duplicate]

I have been using a package to calculate $R^2$ values for mixed models. The documentation for the package has the following quote from Harry Singmann: "The fact that calculating a global measure of ...
417 views

Random effects model handling redundancies

I am trying to deal with a time-to-event analysis using repeated binary outcomes. Suppose that time-to-event is measured in days but for the moment we discretize time to weeks. I want to approximate ...
40 views

Interpreting nested mixed effects modelling output

I am having difficulties in interpreting my R output for a multilevel model I have conducted using the NLME package. I'm looking to answer the following questions: 1) What are the predictors of ...
232 views

Checking a beta regression model via glmmTMB with DHARMa package

I would like some clarification whether my model is well specified or not (since I do not have much experience with Beta regression models). My variable is the percentual of dirth area in the denture....
58 views

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 ...
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 ...
69 views

Is it possible to have exactly identical output of random effects and fixed effect models in a network meta-analysis?

I conducted a network meta-analysis in frequentist framework using the R package netmeta (https://cran.r-project.org/web/packages/netmeta/netmeta.pdf), statistical details of this package are ...
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}...
11 views

Using Random Effects for ordered probit model

I am trying to estimate an ordered probit model, where the data in question comes from two separate counties. I was thinking that I should use fixed effects to account for unobserved heterogeneity ...
44 views

Panel Data for 20 countries with same independent variable for each country

I am analyzing the impact of US monetary policy variables on capital flows to emerging markets and intend to use panel data analysis. I have data on capital flows for 20 countries individually from ...
77 views

lme4::glmer : Get the covariance matrix of the fixed and random effect estimates

My problem may seem easy but I have found no satisfactory solution. I am stuck on this problem for a few days already. How to obtain the covariance matrix of the fixed AND random effects estimates ...
23 views

Modeling repeated measure effect with linear mixed effect models (lmer) in R

this is the first time I'm posting a question here, I hope someone will read it soon :) I have the following problem: I have three groups of people (ADHD patients, ADHD patients under medication, ...
16 views

Is is possible to estimate a mixed logit model with only individual specific parameters?

I am analyzing some data and I do not have any alternative specific variables in the dataset. The question is about the preference between taxi, uber and automated vehicle if all three have the same ...
37 views

Variable selection for mixed models

Longtime lurker here. I have a question about determining informative variables in generalized linear mixed models (GLMMs). My background is ecology, and I primarily examine habitat selection under ...
11 views

Interpreting Durbin–Wu–Hausman test with large sample size

I'm trying to determine whether to use random-effects or fixed-effects. The Durbin–Wu–Hausman is significant which suggests that fixed-effects are more appropriate. However, looking at the details, ...
73 views

zeroed random effects after fitting a mixed effect model [closed]

I am fitting a linear mixed effect model with two categorical factors: mPair with 6 levels, and spd_des with 3 levels. This is a ...
43 views

Is it correct to treat a confounding variable as random with mixed modelling?

In a semi-controlled experiment, seeds were sown in about 20 boxes, associated with 3 types of soil. A few months later, the morphological characteristics of the shoots were measured. We would like to ...
65 views

diagonal var-cov matrix for random slope in lme4

I am fitting a mixed effect model with a random slope on a factor with 6 levels using the function lmer(). ...