set.seed(1)
n <- 150; p <- 6
X <- matrix(rnorm(n*p), n, p); colnames(X) <- paste0("x",1:p)
eta <- 0.4 + X[,1] - 0.7*X[,3]
mu <- plogis(eta)
Y <- rbeta(n, mu*25, (1-mu)*25)
betareg_step_aic(X, Y) # should return (Intercept) + x1,x3 nonzero often
betareg_step_bic(X, Y)
betareg_step_aicc(X, Y)
Run the code above in your browser using DataLab