Description Usage Arguments Details Value Author(s) Examples
function
description.
1 2 |
formula |
List of the parameters, indicating how they should be computed.
similar to formula for |
n |
Number of observations to be simulated |
idata |
Initial data including some variables to not been simulated. |
q |
number of response variables |
seed |
Seed to be defined with function |
details.
return.
Erick A. Chacon-Montalvan
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # Structure of the model
formula <- list(
mean ~ I(age ^ 2) + fa(sex, beta = c(-1, 1)),
sd ~ fa(sex, beta = c(1, 2))
)
idata <- data.frame(s1 = 1:10)
(datasim <- model_frame(formula, idata = idata))
(datasim <- model_frame(formula, n = 10))
formula <- list(
mean ~ I(5) + I(0.5 * x1) + I(0.1 * x2),
sd ~ I(2) + I(x)
)
# Structure of the model
formula <- list(
mean ~ fa(sex, beta = c(-1,1)),
sd ~ I(0)
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.