ProbitSimulate {daarem} | R Documentation |
Function to simulate data from a Probit regression model. User provides a design matrix and a vector of regression coefficients. Output is a vector of 0/1 responses.
ProbitSimulate(beta.vec, X)
beta.vec |
A vector of length p containing the true regression coefficients of the Probit regression model to be simulated from. |
X |
An n x p design matrix for the Probit regression model to be simulated from. |
A vector of length n containing binary outcomes (i.e., 0 or 1).
Nicholas Henderson
n <- 200 npars <- 5 true.beta <- .5*rt(npars, df=2) + 2 XX <- matrix(rnorm(n*npars), nrow=n, ncol=npars) yy <- ProbitSimulate(true.beta, XX)