generate_X_dist.RdGenerate 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)Number of observations
Number of predictors requested
Correlation between variable 3-5
Data frame of predictors
X <- generate_X_dist(n=100, p=10, rho=0.5)