Skip to main content
3 votes

How to generate 2 correlated Beta random variables

How can you simulate correlated beta distributed variables? This question has attracted a lot of views, suggesting (future) readers might still be interested in the titular question. I would like to ...
Frans Rodenburg's user avatar
2 votes
Accepted

Does my observational study present as being a nested or crossed design?

My question is: if I want to use the full dataset, does my site variable also technically count as being "nested" within my year variable? If the same site is present in multiple years (and ...
Eoin's user avatar
  • 9,407
2 votes

Advice on mixed effect model formula for R's lme4

The approach to using mixed effects modeling with zipcode as a grouping variable for random intercepts to account for the nested structure of the data is ...
Robert Long's user avatar
2 votes

Calculating confidence interval for ratio of sums

The classical solution to this is based on noting that $$\mu_y/\mu_x= r$$ exactly when $$\mu_y-r\mu_x=0$$ The central limit theorem gives you a bivariate Normal approximation for $(\bar X, \bar Y)$ ...
Thomas Lumley's user avatar
2 votes

Why is correlation obtained from nlme different from Pearson correlation?

The correlation values provided by the lme function for your mixed model represent the correlations between the estimated coefficients (slopes) of the model. These ...
Robert Long's user avatar
1 vote

Recreate `lm` Categorical Regression

There actually is a reference given, Statistical Models in S by Chambers and Hastie. R does not necessarily use dummy variables. The contrasts option, or contrasts ...
Thomas Lumley's user avatar
1 vote

lmer - how to report results and group differences?

This seems to be more of a programming question. You can specify the desired values of the (continuous) covariate: ...
Roland's user avatar
  • 6,721
1 vote

My data is clustered in space, how can I account for that in a GAMM?

What you are describing is called spatial autocorrelation: Observations physically closer to each other are assumed to be more strongly correlated to each other. A common approach is to either: ...
Frans Rodenburg's user avatar
1 vote

False convergence warning message in lmer

Answering to help reduce the amount of old unanswered questions. I think there has to be some autocorrelation between each 30 seconds unit of analyis and need to include it in my model but do not ...
Robert Long's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible