define_ssmodel {sectorgap}R Documentation

State space model

Description

Defines a state space model for the provided settings and data.

Usage

define_ssmodel(settings, data)

Arguments

settings

list with model setting, in the format returned by the function initialize_settings

data

list with at least two named components: tsm is a multiple time series object that contains all observation series, weights is a named list of time series with (nominal) weights, the list names correspond to the different groups, i.e., group1, group2, subgroup1, if present in the model

Details

data is preferably the output of funtion prepare_data.

Value

A state space model object of class ss_model, which consists of an object returned by the function SSModel of the package KFAS and in addition a list item called names which contains information on the parameters to be estimated.

Examples

data("data_ch")
settings <- initialize_settings()
data <- prepate_data(
  settings = settings,
  tsl = data_ch$tsl,
  tsl_n = data_ch$tsl_n
)
model <- define_ssmodel(
  settings = settings, 
  data = data
)

[Package sectorgap version 0.1.0 Index]