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

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."

0
votes
0answers
5 views

Mixed effect model covariance prior

How should I choose the covariance prior for my bglmer model? This is a model which has the singularity problem. ...
0
votes
0answers
14 views

Fixed or random effects in a subgroup analysis where heterogeneity is present in one of the subgroups but not the overall pooled result?

I am looking at a meta-analysis where a subgroup analysis has been performed, as it is important to consider the treatment effect within 2 subgroups of interest, as well as the overall pooled result. ...
0
votes
0answers
28 views

Random Regression in R

I am a student. I have some knowledge of mixed regression models. I would like to implement Random Regression in R. I found "Random Regression Models" by Schaeffer (http://animalbiosciences.uoguelph....
0
votes
2answers
30 views

The correct random slope model for nested data

I'm trying to see how personalities of individuals change with time. The variables in my data are: 1. latency to emerge (response variable in continuous scale) measured for 204 individuals from 14 ...
0
votes
0answers
11 views

Introducing random slopes in models with nested random effects

I'm trying to see how latency to emerge (response variable) is varies with time (trials). Individuals (ID) are nested within colonies. The nesting is such that individuals 1-20 belong to colony 1, 21-...
0
votes
0answers
24 views

glmer in R, complex random effect

I'm trying to run a mixed model analysis with a negative binomial distribution. Here is the code and the result: ...
0
votes
0answers
22 views

How can i plot a linear mixed model

i have constructed a mixed model for a nested design. i have attached it below: A researcher observes variation in wing size in a beetle species in South-America and wants to know whether wing size ...
0
votes
0answers
21 views
0
votes
0answers
27 views

Estimation of Random effects in lmer(): Defining model correctly

We have analyzed the levels of a protein in 500 samples, analyzing 100 samples in 5 consecutive experiments. 10 of the samples were included in all five experiments, which means there are 460 samples ...
1
vote
1answer
25 views

R - How to get estimates and p-values for random effects in glmer

I have data about around 100,000 protests nested within 40 countries and I want to analyze when the claims of a protest are directed at the state, based on action and country level characteristics, ...
2
votes
1answer
38 views

Introducing random slopes in nested model improves model fit but residuals variances become unequal

I have measured boldness scores (continuous variable) across time (trials) for individuals (ID) within colonies (colony). The data is coded such that individuals 1-30 belong to one colony, 31-60 to ...
3
votes
1answer
54 views

Fixed Effects vs. Random Effects vs. First Differences

I'm working on a university task where I have to estimate the following using panel data: \begin{equation} y_{it} = x_{it}\beta + \alpha_i + \epsilon_{it} \end{equation} where $y_{it}$ is log($...
1
vote
0answers
20 views

Is Hausman-Taylor Estimator with different within- and between-group effects biased?

Background Assume the simple two-level linear model $$y_{ij}=\beta_0 + \beta_1X_{ij}+\beta_2X_{ij}^{end}+\beta_3Z_j+\beta_4Z_j^{end}$$ where $X_{ij}$ and $Z_j$ are exogenous and $X^{end}_{ij}$ and $Z^...
0
votes
0answers
10 views

ANCOVA vs Random effect for category

Assuming a categorical variable is a nuisance variable, why would one ever use it as a fixed effect as in ANCOVA instead of using it as a random effect? As an example consider modeling the ...
0
votes
2answers
43 views

GLMM species count data with transects

I am trying to create a GLMM model which explains differences in abundance/count of three species of scorpion around a field reserve in different forest types. -I have 7 trails in different forest ...
0
votes
0answers
25 views

A survival (accelerated failure time) regression model for censored data across several trials

I have this experimental design: Two groups A and B. Individuals from group B were genetically manipulated such that when they are given a certain drug the drug turns on a gene that was inserted ...
1
vote
0answers
23 views

Difference between random slopes and a random intercept for each combination of a random:fixed effect?

In a mixed effects model, I'm trying to understand the distinction between the following two models: y ~ group + (1+group|subject) and ...
0
votes
0answers
14 views

Adding random slopes for all predictors and interactions with lme4

I'm running some mixed-effect logistic regressions using lme4. So far, all the models contained two random effects (subject and item), and now I would like as well random slopes for all predictors and ...
0
votes
0answers
18 views

Random effects model vs pooled OLS

Can someone please explain why bother using random effects if the unobserved constant effects are assumed to not be correlated with the explanatory variable? Why not just using a pooled OLS?
0
votes
0answers
25 views

How would I plot a random effect model with categorical predictors in R?

I've run a random intercept model in the lmer package in R where I have a response (count data) as a function of a binary categorical variable with a random intercept of time, for repeated measures. I ...
3
votes
1answer
43 views

Non-normal random effects in a logistic GAM

I have estimated the following GAM using the mgcv package: ...
1
vote
1answer
27 views

Mixed Effects Model: How to Specify a Random Effect Nested Within 2 Factors in R

I have some example data that I need to fit using a mixed effects model. I can do this in Minitab, but struggling to specify the model correctly in R. I need 2 factors treated as fixed effects "...
1
vote
1answer
31 views

Negative Binomial Model: Fixed vs Random Effects

How to choose between Fixed and Random Effects in panel negative binomial model? Is Hausman test valid for this?
1
vote
1answer
41 views

Appropriate way to model nested random effect structure with lme4

Let's say I have data on firms (nested within countries). Some firms are multinational, others only have a single instance. The dependent variable is revenue. What is the appropriate way to account ...
3
votes
0answers
23 views

Use of sqrt link with negative binomial glmer

It doesn't seem to be directly possible to use a sqrt link function in lme4::glmer.nb. This is a pity because on my specific data, with the fix effect model, the sqrt link does improve the ...
2
votes
1answer
45 views

Is it possible (or even advisable) to only include random slopes for some contrasts of levels of a factor but not others?

Suppose the following model: DV is reaction time. The predictor is a categorical factor with three levels, manipulated within participants. Each participant gets fifty trials at each level of this ...
3
votes
1answer
22 views

Do I need to nest observation windows in each trial as a random effect?

The study is as follows: Participants are observed at three ages. Observations at each age involves 10 trials (i.e., stimuli they are presented with while their eye gaze is measured). Each trial is ...
0
votes
1answer
100 views

Comparing the random effects and fixed effects models

Consider the random effects model $y_{it} = x_{it}'\beta + \mu_i + \nu_{it}$ where the composite error is $\mu_i + \nu_{it}$. We transform the variables and the error term of the regression equation ...
0
votes
0answers
17 views

Line chart indicates high variation in random slopes, but this isn't reflected in model results

I have a daily diary dataset and am interested in assessing whether there is evidence of randomly varying slopes between a daily predictor (exercise) and a daily dependent variable (happiness). ...
0
votes
0answers
20 views

How to assess two random effects and interpret

I want to study the impact of two numerical factors (A & B) on outcome C (binomial). I used glmer in lmer4 package, and my models were as 1) m1<-glmer(C ~ A+B+(1|subject)+(A+B-1|subject), ...
1
vote
0answers
21 views

Detecting over-parameterization in GLMM: number of observations to number of parameters ratio?

I'm using generalized linear mixed models (GLMM) to model the effect of several testing conditions on the binary outcome of a behavioral trial. There were 40 individual subjects in my experiment, and ...
1
vote
1answer
33 views

Should I remove correlations between random effects before removing some of them?

I have read that a good approach to mixed modeling is to try and fit the maximally complex random effects structure, and then simplify it until it converges. I would like to be principled about this ...
1
vote
0answers
28 views

How can I perform bivariate random-effects meta-regression if the implied between-study covariance matrix is not positive definite?

I have described my problem here: How can one get consistent (i.e. direct+indirect=total) effects in a Meta-Analytic SEM model with latent variables? Unfortunately, the solution I've found to this ...
2
votes
0answers
95 views

Zero variance of random effects after removing of correlation in linear mixed models

I have some hierarchical data (roughly 23 observations per individual, 20 individuals per region, and 17 regions in total), and use linear mixed models (LMM) to adjust for the dependencies that come ...
0
votes
0answers
19 views

within vs between subject variability:LME?

I have multiple time points of data for my subjects and would like to look at a individual variability measure and see if that has a different associations with my predictor than the between-subject ...
0
votes
1answer
17 views

Estimating the effect of time-invariant and time-varying regressors using Fixed Effects

I have a question about the Fixed vs Random effects modeling. It is said that Fixed effects modeling identifies only parameters for time-varying regressors, not for time-invariant regressors I ...
2
votes
1answer
41 views

Specifying multilevel model structure when random effects exhaust the population

I have been working with a dataset featuring observations at the county level for about 1300 of the ~3100 or so counties of the United States. These 1300 counties are drawn from every state in the ...
7
votes
2answers
96 views

huge difference between estimates of binomial regresssion when including random effect vs when not

I'm trying to estimate the average score for two groups of students. I use a binomial regression model. The total_ans is the total question they've have answered, ...
0
votes
1answer
39 views

random effects with very large variance

I'm getting really very large variance for my random effects ...
1
vote
1answer
19 views

Comparing non-independent metaanalytic effect sizes

I am running a random-effects meta-analysis on a collection of placebo controlled trials. Each trial reports on the effects of the drug and placebo on 'positive symptoms' and 'negative symptoms'. I ...
1
vote
2answers
72 views

Modeling within group correlation - random effects, fixed effects, clustered standard errors?

I know this kind of question has been asked before, but I can't find anything that clearly elucidates the issue. What is the 'right' way to model the follow situation: Let's say I pair two people up ...
1
vote
1answer
26 views

Control for over-dispersion. Why do this: take natural log of metric, exponentiate, rank, remove top and bottom 10%

I'm looking at some NHS healthcare data on the number of deaths in England The measure i'm looking at is called the SHMI - it's simply: The number of observed deaths at a hospital / The expected ...
0
votes
0answers
23 views

Random sampling during an website redirect (A/B-like) test

I'm working on a website design test for a client where 33% of traffic will be diverted to a Treatment page and 33% will diverted to a Control Test (which will be just the same experience as the ...
0
votes
0answers
15 views

Model comparison for random effects when items belong to multiple groups

This may be basic, but I'm not sure how to find an answer. I'm fitting a model on a time series with 1000 data points. Most of these points belong to more than one genre - adding the genre parameter ...
0
votes
1answer
27 views

How to include nested data in a mixed-effects model using R?

I am analyzing data from bird foraging surveys using the lme4 package in R and I am interested in the effects of field size (area), among other variables, on swallow rate of use. The surveys took ...
1
vote
1answer
46 views

mixed effects model in repeated measurements

My question is conceptual. Suppose $n$ patients, where each one is measured at 4 different time points. The outcome is continuous. The patients are randomly assigned to two groups, intervention yes/no....
0
votes
1answer
31 views

Is it neccessary to test for serial correlation in a multi-level model

I am running a multi-level model looking at factors that explain attainment. There are pupil- and school-level predictors, and the school the pupil attends is modelled as a random effect. I have run ...
1
vote
1answer
22 views

Can delta method be applied for determining the between subject variability (random variance) of a function of X?

Say, for example, I square root transformed X such that it follows normal distribution, fitted a linear mixed effects model and obtained between subject variability (BSV) of sqrt(X). How do I now ...
0
votes
1answer
28 views

Equation for GLMM w crossed random effects and logit link function

I am working on a GLMM model with crossed random effects and I would like to write an equation from the output where the outcome is the probability rather than a log of the odds. ...