VI_MODEL-cash-formula: Closed form expression of 'y'

VI_MODEL$formulaR Documentation

Closed form expression of y

Description

A quoted formula, will be passed to CLOSED_FORM$instantiate to define a closed form expression for y.

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$formula

# `y` has the same expression
test$prm$y

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