Questions tagged [random-effects]

238 questions
2
votes
1 answer

Recreating SAS mixed model output (including F tests) in R

I recently took an ANOVA class in SAS, and am rewriting my code in R. Thus far, translating random effect (and mixed effect) models from SAS to R has eluded me. The output I get from R is very different from SAS: the SS and F value are different,…
dkae
  • 293
  • 3
  • 11
2
votes
0 answers

nlme or lme4 multi-level model with two repeated measures (either nested or crossed). how to model?

I have a question regarding the modelling of fixed effects and random effects of two repeated measures. My dataset looks like this: subject id condition trial DV 1 1 1 2 1 1 …
Anna
  • 21
  • 1
2
votes
2 answers

Extracting random effects from a gamlss object

I have run a beta regression with random intercepts model using the gamlss package in R. The call looks like: uik.max.model <- gamlss(formula = max.opp.vote ~ n_commute + vote_commute + uik_dummy + opp.gd + opp.m + pay +…
Sean Norton
  • 277
  • 1
  • 12
2
votes
0 answers

Calculate ICC confidence intervals logistic regression

I have run a logistic regression model and I am trying to determine how significant the random effect is in the model. I am doing this for both the null and full models but I will just show the null model here. Here is what I have so far: >…
Cwilson
  • 21
  • 2
2
votes
0 answers

Interpreting output of mixed effects survival model using survreg() with multiple frailties (maybe coding errors)

I am having trouble interpreting the results of my model. I have run a mixed effects model with two fixed effects, two random effects using frailty(), and two interaction terms (fixed:fixed and fixed:random). I am interested in reconstructing a…
2
votes
1 answer

R: meta-analysis for repeated measures / random effects model

mydat <- data.frame(stage1 = c(4, 3, 2, 1), n1 = c(10, 40, 30, 20)) mydat stage1 n1 1 4 10 2 3 40 3 2 30 4 1 20 I have a simple data set with 4 studies (1 per row) and I have the number of events (stage1) and the sample size…
Adrian
  • 9,229
  • 24
  • 74
  • 132
2
votes
1 answer

Nested Random effect in JAGS/ WinBUGS

I am interested in fitting the following nested random effect model in JAGS. SAS code proc nlmixed data=data1 qpoints=20; parms beta0=2 beta1=1 ; bounds vara >=0, varb_a >=0; eta = beta0+ beta1*t+ b2+b3; p =…
belaya
  • 15
  • 4
2
votes
0 answers

Autocorrelation in Panel Data

I employed a random-effects plm model (from package plm) to estimate my coefficients and I used the vcovHC in order to correct for heteroskedasticity. However, how can I correct for autocorrelation as well? Should I use vcovNW or vcovSCC? because I…
Beatrice
  • 19
  • 2
2
votes
1 answer

Non-linear random-effects regression with multiplication of coefficients in R

I have two regression models without random effects: one is OLS using lm, the other includes multiplication of coefficients using nle. I wish to add individual-level random effects to both. I've managed to do this for the OLS function using the lme4…
2
votes
1 answer

One-way random-effects ANOVA in SAS: PROC GLM or MIXED?

I'm attempting to conduct a simple one-way random-effects ANOVA in SAS. I want to know if the population variance is significantly different than zero or not. On UCLA's idre site, they state to use PROC MIXED as follows: proc mixed data = in.hsb12…
Meg
  • 696
  • 1
  • 7
  • 20
2
votes
1 answer

R, lme: specifying random effects for mixed model of before-after-gradient analysis

I'm trying to measure the biological impacts of an industrial development using a Before-After-Gradient approach. I am using a linear mixed model approach in R, and am having trouble specifying an appropriate model, especially the random effects.…
2
votes
1 answer

Random Effects with count Models

I'm trying to do a hurdle model with random effects in either r or stata. I've looked at the glmmADMB package, but am running into problems getting it download in R and I can't find any documentation on the package in Cran. Is this package still…
1
vote
0 answers

Cross mixed effects model in R as a Mathematical Formula

Mixed effects models(MEM) can be nested or crossed. For crossed models specifically, how would the below R code look as a mathematical formula in an academic paper? There are multiple random and fixed effects. M1 = lmer(Y ~ A + B + C + D + E + (…
MLux
  • 11
  • 2
1
vote
1 answer

How to extract metafor::rma.mv() equivalent of lme4::VarCorr() for multilevel mixed effect meta-regression with random slopes

I am attempting to calculate pseudo R squared's for a multilevel mixed-effect meta-regression that includes random slopes in the metafor package (i.e., rma.mv() object) using a similar approach to the following…
zr2015
  • 13
  • 3
1
vote
1 answer

Nested sample design in mgcv syntax

I'm having trouble translating my sample design into the correct mgcv package syntax for random effects. Here is the set-up: we trawl for fish, once per "collection" site, at the same 12 sites per month (hopefully), for 7 consecutive months, every…
Nate
  • 411
  • 2
  • 10