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.
jubilee.macro_cost(dtb, rs, penalty = c(1, 1, 1), new.tb3ms = NA,
new.gs10 = NA)
data table, usually this is the reg.dtb of the jubilee object
the list returned from jubilee.macro_fit
numeric, the penalty vector for the 6 models.
Default is c(1,1,1)
.
numeric, vector of new rate.tb3ms
with length equal to NROW of dtb.
Default is NA
.
numeric, vector of new rate.gs10
with length equal to NROW of dtb.
Default is NA
.
The data table containing the "macro.cost" column