VI_MODEL-cash-null_formula: Formula for fitting the null model

VI_MODEL$null_formulaR Documentation

Formula for fitting the null model

Description

A quoted formula, will be used to fit the null model.

Examples


# Instantiate
x <- rand_uniform()
e <- rand_normal()
test <- vi_model(prm = list(x = x, e = e),
                 prm_type = list(x = "r", e = "r"),
                 formula = y ~ 1 + x + x^2 + e,
                 null_formula = y ~ x,
                 alt_formula = y ~ x + I(x^2))

# A formula with environment equals to `test`
test$null_formula

# By default, `fit` use the null formula
test$fit(test$gen(10))

# F-test also needs to use the null model
test$test(test$gen(1000))

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