View source: R/simulateCovariateData.R
simulateCovariateData | R Documentation |
This function generates a simulated data with independent categorical covariates. The first two covariates namely x1 and x2 are generated using random normal rnorm(n, 40, 20) and random poisson rpois(n, lambda = 4).The remaining covariates are generated at random with categories 0,1,2.
simulateCovariateData(n, nCov = 2)
n |
numner of observations to be generated for the data |
nCov |
4+ number of covariates to be generated for the data, the first 4 covariates generated based on pre-specified distributions |
returns a data frame with covariates x1, x2, ...
simulateCovariateData(10, nCov=15)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.