jubilee.macro_cost: Calculate the cost function of the macro model

Description Usage Arguments Value Author(s)

View source: R/jubilee-macro-cost-method.R

Description

This utility calculates the cost function of the macro model according to the squared error sum with penaty parameter. This utility can be used to experiment more sophisticated optimization schemes.

Usage

1
2
jubilee.macro_cost(dtb, rs, penalty = c(1, 1, 1), new.tb3ms = NA,
  new.gs10 = NA)

Arguments

dtb

data table, usually this is the reg.dtb of the jubilee object

rs

the list returned from jubilee.macro_fit

penalty

numeric, the penalty vector for the 6 models. Default is c(1,1,1).

new.tb3ms

numeric, vector of new rate.tb3ms with length equal to NROW of dtb. Default is NA.

new.gs10

numeric, vector of new rate.gs10 with length equal to NROW of dtb. Default is NA.

Value

The data table containing the "macro.cost" column

Author(s)

Stephen H. Lihn


jubilee documentation built on Jan. 24, 2020, 5:10 p.m.