simulate_basel: Simulate baselers dataset

Description Usage Arguments Value

View source: R/simulate_basel.R

Description

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.

Usage

1
2
simulate_basel(nsim = 1000, corMat_f = NULL, corMat_m = NULL,
  seed = NULL)

Arguments

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.

Value

A tibble with nsim rows, containing continous and categorical simulated data of inhabitants of Basel.


therbootcamp/basel documentation built on Nov. 5, 2019, 10:05 a.m.