# Logistic Student's t STVAR with p=1, M=2, and the first lag of the second variable
# as the switching variable, with penalized log-likelihood, with very strong penalization:
params12 <- c(0.62906848, 0.14245295, 2.41245785, 0.66719269, 0.3534745, 0.06041779, -0.34909745,
0.61783824, 0.125769, -0.04094521, -0.99122586, 0.63805416, 0.371575, 0.00314754, 0.03440824,
1.29072533, -0.06067807, 0.18737385, 1.21813844, 5.00884263, 7.70111672)
mod12 <- STVAR(data=gdpdef, p=1, M=2, params=params12, weight_function="logistic",
weightfun_pars=c(2, 1), cond_dist="Student", penalized=TRUE, penalty_params=c(0.4, 0.4))
mod12$IC # IC without penalization term in loglik
get_penalized_IC(mod12) # IC with penalization term in loglik
Run the code above in your browser using DataLab