Description Usage Arguments Details Value Author(s) Examples
function
description.
1 2 3 | model_response(model_frame, formula = attr(model_frame, "formula"),
link_inv = replicate(length(formula), identity), generator = rnorm,
responses = c("response"), seed = NULL)
|
model_frame |
A |
formula |
An optional list of formulas to simulate the parameters of the response variables. |
link_inv |
A list of function representing the inverse link function for the parameters. |
generator |
Function to generate the response variables given the parameters |
responses |
character vector indicating the names of the 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 20 21 22 23 | f <- list(
mean ~ I(5 + 0.5 * x1 + 0.1 * x2 + 0.7 * id1),
sd ~ I(x1)
)
(model_fr <- model_frame(f, n = 10))
(data <- model_response(model_fr, link = list(identity, exp)))
beta0 <- c(-1, 1)
# Structure of the model
formula <- list(
mean ~ fa(sex, beta = get("beta0")),
sd ~ I(0)
)
(model_fr <- model_frame(formula, n = 10))
(data <- model_response(model_fr, link = list(identity, exp)))
formula <- list(
mean ~ mfe(x, beta = 1:2),
sd ~ mfe(x1, beta = 1:2)
)
(model_fr <- model_frame(formula, n = 10))
#(data <- model_response(model_fr, link_inv = list(identity, exp), responses = 1:2))
#(data <- sim_model(formula, link_inv = list(identity, exp), n = 10, responses = 1:2))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.