Function for contstructing a new `StatModel` object.

StatModel(
  type = "fitError",
  params = list(),
  varPosterior = NA_real_,
  dfPosterior = NA_real_
)

Arguments

type

default set to fiterror, can be a glm

params

A list containing the parameters of the fitted glm

varPosterior

Numeric, posterior variance of the glm, default is NA

dfPosterior

Numeric, posterior degrees of freedom of the glm, default is NA

Value

A StatModel object

Examples

## A fully specified dummy model
myModel <- StatModel(
    type = "glm",
    params = list(x = 3, y = 7, b = 4),
    varPosterior = c(0.1, 0.2, 0.3),
    dfPosterior = c(6, 7, 8)
)
myModel
#> An object of class "StatModel"
#> Slot "type":
#> [1] "glm"
#> 
#> Slot "params":
#> $x
#> [1] 3
#> 
#> $y
#> [1] 7
#> 
#> $b
#> [1] 4
#> 
#> 
#> Slot "varPosterior":
#> [1] 0.1 0.2 0.3
#> 
#> Slot "dfPosterior":
#> [1] 6 7 8
#>