Instantly share code, notes, and snippets.

What would you like to do?
SimExperiment <- function(num.groups, sample.size, beta, = FALSE){
"Simulate running an analysis of the experiment with linear regression"
df <- CreateClusteredData(num.groups, sample.size, beta, =
m <- lm(y ~ trt, data = df)
c(as.numeric(coef(m)[2]), as.numeric(sqrt(diag(vcov(m))[2])))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment