AR1_MODEL$..init.. | R Documentation |
This function will be called after an instance is built. User
input will be stored in the environment. The response variable of this model
is y
. The formula of y is defined in AR1_MODEL$formula, the null
formula is defined in AR1_MODEL$null_formula, the alternative is
defined in AR1_MODEL$alt_formula.
phi |
Numeric. The parameter for the |
sigma |
Positive numeric. Default is |
x |
Random variable or closed form expression. Default is
|
e |
Random variable or closed form expression. Default is
|
Return the object itself.
# Instantiate
x <- rand_uniform()
e <- rand_normal(sigma = 0.5)
test <- ar1_model(phi = 0.9, x = x, e = e)
test
# Generate data
test$gen(10)
# Generate lineup
test$gen_lineup(10, k = 3)
# Plot the lineup
test$plot_lineup(test$gen_lineup(100))
test <- ar1_model(phi = 0.1, x = x, e = e)
test$plot_lineup(test$gen_lineup(100))
test <- ar1_model(phi = 0.3, x = x, e = e)
test$plot_lineup(test$gen_lineup(100))
test <- ar1_model(phi = 0.5, x = x, e = e)
test$plot_lineup(test$gen_lineup(100))
test <- ar1_model(phi = 0.7, x = x, e = e)
test$plot_lineup(test$gen_lineup(100))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.