Tag Info

Hot answers tagged r

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 ...
• 12.9k
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 ...
• 9,407

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 ...
• 64k

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)$ ...
• 41.6k

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 ...
• 64k
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 ...
• 41.6k
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: ...
• 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: ...
• 12.9k
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 ...
• 64k

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