Description Usage Arguments Value
View source: R/simulate_basel.R
This function can be used to simulate nsim participants. It draws samples from a mulitvariate normal distribution with a prespecified correlation matrix (corMat_f for women and corMat_m for men). Most (but not all) of the means (but not the correlations) are based on actual data of the swiss population. Details can be found in the data helpfile you can call with ?baselers if the package is loaded.
1 2 | simulate_basel(nsim = 1000, corMat_f = NULL, corMat_m = NULL,
seed = NULL)
|
nsim |
integer. The number of participants to simulate (same number of men and women). If an uneven number is specified, the returned dataset will contain one additional row. |
corMat_f |
double matrix. A symmetric correlation matrix. If not specified the default matrix is used. |
corMat_m |
double matrix. A symmetric correlation matrix. If not specified the default matrix is used. |
seed |
integer. Is passed to set.seed, specify the same number to replicate results. If not provided, results will vary randomly. |
A tibble with nsim rows, containing continous and categorical simulated data of inhabitants of Basel.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.