QUARTIC_MODEL-cash-..init..: Initialization method

QUARTIC_MODEL$..init..R Documentation

Initialization method

Description

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 QUARTIC_MODEL$formula, the null formula is defined in QUARTIC_MODEL$null_formula, the alternative is defined in QUARTIC_MODEL$alt_formula.

Arguments

a

Numeric. Default is a = 1.

b

Numeric. Default is b = 1.

c

Numeric. Default is c = 1.

sigma

Positive numeric. Default is sigma = 1.

x

Random variable or closed form expression. Default is x = rand_uniform(-1, 1, env = new.env(parent = parent.env(self))).

e

Random variable or closed form expression. Default is e = rand_normal(0, sigma, env = new.env(parent = parent.env(self))).

Value

Return the object itself.

Examples


# Instantiate
x <- rand_uniform()
e <- rand_normal()

test <- quartic_model(a = 200, b = 200, c = 20, 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))

TengMCing/visage documentation built on Aug. 28, 2024, 3:27 p.m.