View source: R/model_fam_data.R
model_fam_data | R Documentation |
Create a dataset to fit models with all possible families in distreg packages
model_fam_data(nrow = 500, seed = 1408, fam_name = "NO")
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. |
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.
A data.frame with columns for differently distributed data.
# Beta distributed random values
model_fam_data(nrow = 500, fam_name = "BE")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.