# simulate some data
data <- sim_design(within = 2, between = 2,
mu = c(1, 0, 1, 1),
long = TRUE, empirical = TRUE)
# get coefs for the full factorial model
get_coefs(data)
# a reduced model
get_coefs(data, y ~ B1 + W1)
# specify a different model function
data$y <- norm2binom(data$y)
get_coefs(data, fun = glm, family = binomial)
Run the code above in your browser using DataLab