New answers tagged

3 votes

Calculating minimum sample size required for repeated measures linear mixed model using the simr package

Some Background Since you don't have a strong idea yet of what effects to expect, I recommend that you try to find articles that cover this to a degree. There is a lot of reaction time studies out ...
Shawn Hemelstrand's user avatar
1 vote

How to simulate n Uniform[0,1] variables with a specified correlation?

Inspired by @whuber 's approach, I created my own approximation that I hope might be useful to future readers. The essential insight is that the function $f^{-1}(\rho)$ (which allows one to determine ...
Emmy B's user avatar
  • 63
3 votes
Accepted

Omitted variable bias: 3 correlated variables and 1 omitted (R simulation)

Your calculations are incorrect because in a regression with more than two explanatory variables the omitted-variable bias (OVB) for x3 is not a function of ...
dipetkov's user avatar
  • 8,740
0 votes

Simulating exponential Vasicek/Ornstein-Uhlenbeck

I used the formula from the Wiki page of Ornstein-Uhlenbeck process. ...
languageoftheuniverse's user avatar
4 votes

simr Power analysis consistently yields low power

The problem with your simulation is that there is no meaningful 'effect'. You are simulating a standard normal distribution for your predictor and then a second normal distribution, centered on the ...
PBulls's user avatar
  • 1,911
0 votes

Estimating error variance for simulated path analysis

I would like to estimate the error variance of M and Y You are running a simulation, so can specify whatever population values you want for the error variances. I assume you mean that you would like ...
Terrence's user avatar
  • 1,773

Top 50 recent answers are included