I am trying to have RStudio to:
- run a code 20 times “regression”
- gather the results from each regression “Alpha, Beta and Pr value” and give it to me ready in a table format.
Below is the regression code I am using:
xaxis = rnorm(500,0,1)
eval = rnorm(500,0,1)
beta = 0.5
intercept = 1.5
yaxis = intercept + beta*xaxis + eval
Regression_yxe = lm(yaxis ~ xaxis)
summary(Regression_yxe)
Thanks,