fit.stsm: Estimation of a STS model

View source: R/stsm.R

fit.stsmR Documentation

Estimation of a STS model

Description

fit is used to estimate a stsm model.

Usage

## S3 method for class 'stsm'
fit(mdl, updmdl, par, fixed = NULL, show.iter = FALSE, tol = 1e-04, ...)

Arguments

mdl

an object of class stsm.

par

argument passed to the updmod function.

fixed

vector of logical values indicating which parameters are fixed (TRUE) or estimated (FALSE).

show.iter

logical value to show or hide the estimates at the different iterations.

tol

tolerance to check if a root is close to one.

...

other arguments.

updmod

function to update the parameters of the model.

Value

An object of class "stsm" with estimated parameters.

Examples

# Local level model
b <- 1
C <- as.matrix(1)
stsm1 <- stsm(Nile, b, C, s2v = c(lvl = 0.5), s2u = c(irr = 1), fit = FALSE)
stsm1 <- fit(stsm1, method = "L-BFGS-B")

gallegoj/tfarima documentation built on March 31, 2024, 10:32 a.m.