random_scdf | R Documentation |
The random_scdf
function generates random single-case data frames for
monte-carlo studies and demonstration purposes. design
is used to set
up a design matrix with all parameters needed for the random_scdf
function.
random_scdf(design = NULL, round = NA, random_names = FALSE, seed = NULL, ...)
design |
A design matrix which is created by |
round |
Rounds the scores to the defined decimal. To round to the second
decimal, set |
random_names |
Is |
seed |
A seed number for the random generator. |
... |
arguments that are directly passed to the |
A single-case data frame. See scdf
to learn about this
format.
Juergen Wibert
## Create random single-case data and inspect it
design <- design(
n = 3, rtt = 0.75, slope = 0.1, extreme_prop = 0.1,
missing_prop = 0.1
)
dat <- random_scdf(design, round = 1, random_names = TRUE, seed = 123)
describe(dat)
## And now have a look at poisson-distributed data
design <- design(
n = 3, B_start = c(6, 10, 14), mt = c(12, 20, 22), start_value = 10,
distribution = "poisson", level = -5, missing_prop = 0.1
)
dat <- random_scdf(design, seed = 1234)
pand(dat, decreasing = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.