Generate X from pre-specified distribution. X1 is a Bernoulli distributed rv with probability 0.5. X2 an exponential distribution with lambda=1. X3,X4,Z are standard normal variates with corelation rho and X5=(Z>1), X6 is from a multinomial distribution with 4 equally probable categories. X7-Xp are independent standard normal distributions.

generate_X_dist(n, p, rho = 0.5)

Arguments

n

Number of observations

p

Number of predictors requested

rho

Correlation between variable 3-5

Value

Data frame of predictors

Examples

X <- generate_X_dist(n=100, p=10, rho=0.5)