Learn R Programming

tsgc (version 0.0)

SSModelDynamicGompertz-class: Class for dynamic Gompertz curve state space model object.

Description

Class for dynamic Gompertz curve state space model object.

Methods

get_model(y, q = NULL, sea.type = 'trigonometric', sea.period = 7) Retrieves the model object.

Parameters

  • y The cumulated variable.

  • q The signal-to-noise ratio (ratio of slope to irregular variance). Defaults to 'NULL', in which case no signal-to-noise ratio will be imposed. Instead, it will be estimated.

  • sea.type Seasonal type. Options are 'trigonometric' and 'none'. 'trigonometric' will yield a model with a trigonometric seasonal component and 'none' will yield a model with no seasonal component.

  • sea.period The period of seasonality. For a day-of-the-week effect with daily data, this would be 7. Not required if sea.type = 'none'.

Return Value

KFS model object.

Arguments

Examples

Run this code
library(tsgc)
data(gauteng,package="tsgc")
idx.est <- zoo::index(gauteng) <= as.Date("2020-07-06")

# Specify a model
model <- SSModelDynamicGompertz$new(Y = gauteng[idx.est], q = 0.005)
# Estimate a specified model
res <- model$estimate()

Run the code above in your browser using DataLab