Learn R Programming

tfarima (version 0.3.2)

fit.stsm: Estimation of a STS model

Description

fit fits the stsm to the time series y.

Usage

# S3 method for stsm
fit(mdl, method = "BFGS", show.iter = FALSE, ...)

Value

An object of class "stsm" with the estimated variances.

Arguments

mdl

an object of class stsm.

method

argument of the optim function.

show.iter

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

...

other arguments.

Examples

Run this code
# 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")

Run the code above in your browser using DataLab