model_fam_data: Create a dataset to fit models with all possible families in...

View source: R/model_fam_data.R

model_fam_dataR Documentation

Create a dataset to fit models with all possible families in distreg packages

Description

Create a dataset to fit models with all possible families in distreg packages

Usage

model_fam_data(nrow = 500, seed = 1408, fam_name = "NO")

Arguments

nrow

Number of observations of the exported dataset.

seed

The seed which should be used, for reproducibility.

fam_name

The name of the distribution family to which the first dimension of the uniform distribution should be transformed to.

Details

This function creates a 3-dimensional uniform distribution (with support from 0 to 1) which has a cross-correlation of 0.5. Then the first dimension is transformed into a specified distribution (argument fam_name) via Inverse Transform Sampling https://en.wikipedia.org/wiki/Inverse_transform_sampling. The other two dimensions are transformed into a normal distribution (norm2) and a binomial distribution (binomial1, for testing categorical explanatory covariates). This procedure ensures that there is a dependency structure of the transformed first distribution and the other two.

Value

A data.frame with columns for differently distributed data.

Examples

# Beta distributed random values
model_fam_data(nrow = 500, fam_name = "BE")

Stan125/distreg.vis documentation built on Oct. 31, 2023, 2:40 p.m.