This function generates response variables Y under a given conditional model.

gen.Y(X, beta, Ydist = "gaussian")

Arguments

X

a n by p matrix, containing all the covariates.

beta

a p-dimensional vector, true regression coefficients.

Ydist

the type of conditional model.

Value

A matrix of size n-by-1 containing the response variables.

Details

There are four choices of the conditional model: use "gaussian" to specify a linear model with gaussian noises, use "laplace" to specify a linear model with laplacian noises, use "binom" to specifiy a logistic model, with Y taking values in {-1,1}, use "poisson" to specify a log-poisson model.

See also

Other models: Genotypes.parm(), HMM.parm()