Learn R Programming

NRejections (version 1.2.0)

sim_data: Simulate MVN data

Description

Simulates one dataset with standard MVN correlated covariates and outcomes.

Usage

sim_data(n, cor)

Arguments

n

Number of rows to simulate

cor

Correlation matrix (e.g., from make_corr_mat)

Examples

Run this code
# NOT RUN {
cor = make_corr_mat( nX = 5,
nY = 2,
rho.XX = -0.06,
rho.YY = 0.1,
rho.XY = -0.1,
prop.corr = 8/40 )

d = sim_data( n = 50, cor = cor )
# }

Run the code above in your browser using DataLab