Retrieve formulas from models fitted by bnec. x should be of class bayesnecfit or bayesmanecfit.

# S3 method for class 'bayesnecfit'
formula(x, ...)

# S3 method for class 'bayesmanecfit'
formula(x, model, ...)

Arguments

x

An object of class bayesnecfit or bayesmanecfit.

...

Unused.

model

A valid model string.

Value

An object of class bayesnecformula.

Examples

# \donttest{
library(bayesnec)
formula(manec_example, model = "nec4param")
#> y ~ crf(x, model = "nec4param")
nec4param <- pull_out(manec_example, "nec4param")
#> Pulling out model(s): nec4param
formula(nec4param)
#> y ~ crf(x, model = "nec4param")
# }