families | R Documentation |
These gathered list of family objects let you alter the distributional family
of a simulated variable. They are invoked within the effect generating functions add_effects
.
The families are using the stats functions corresponding to the distributional
family, i.e. for the normal distribution pnorm
.
xy_beta(shape1 = 3, shape2 = 1, ncp = 0)
xy_binom(size = 2, prob = 0.1)
xy_cauchy(location = 0, scale = 1)
xy_chisq(df = 3, ncp = 0)
xy_exp(rate = 1)
xy_f(df1 = 1, df2 = 2, ncp = 0)
xy_gamma(shape = 1, rate = 2, scale = 1/rate)
xy_geometric(prob = 0.5)
xy_hypergeometric(m = 10, n = 7, k = 8)
xy_logistic(location = 0, scale = 1)
xy_lognormal(meanlog = 0, sdlog = 1)
xy_normal(mean = 0, sd = 3)
xy_poisson(lambda = 1)
xy_signrank(n = 5)
xy_t(df = 1, ncp = 0)
xy_uniform(min = 0, max = 1)
xy_weibull(shape = 1, scale = 1)
xy_wilcox(m = 4, n = 6)
shape1 |
a single non-negative parameter (see |
shape2 |
a single non-negative parameter (see |
ncp |
a non-centrality parameter (e.g. see |
size |
a single number of trials (see |
prob |
a single probability (see |
location |
a single location parameter (see |
scale |
a single scale parameter (see |
df |
a single integer specifying the degrees of freedom (see |
rate |
a single non-negative rate parameter (see |
df1 |
a single integer specifying the degrees of freedom (see |
df2 |
a single integer specifying the degrees of freedom (see |
shape |
a single shape parameter (see |
m |
the number of observations in the first sample (see |
n |
the number of observations in the second sample (see |
k |
the number of observations drawn from the sample (see |
meanlog |
a single numeric location parameter (see |
sdlog |
a single numeric scale parameter (see |
mean |
a single numeric location parameter (see |
sd |
a single numeric scale parameter (see |
lambda |
a single numeric value of means (see |
min |
a single numeric value specifying the lower bound (see |
max |
a single numeric value specifying the upper bound (see |
a tibble with information on the distributional properties. This information is only used internally forwarded to the copula simulation.
# build a simulation recipe with linear features from the cauchy distribution
xy_recipe <- Xy(task = "regression") %>%
# add linear features with the desired distribution
add_linear(p = 5, family = xy_cauchy(location = 0, scale = 3))
# build a simulation recipe with squared nonlinear features from the normal distribution
xy_recipe <- Xy(task = "regression") %>%
# add nonlinear features with the desired distribution
add_nonlinear(
p = 5, nlfun = function(x) x^2,
family = xy_normal(mean = 0, sd = 3)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.