| FCVARhypoTest | R Documentation |
FCVARhypoTest performs a likelihood ratio test of the null
hypothesis: "model is modelR" against the alternative hypothesis:
"model is modelUNR".
FCVARhypoTest(modelUNR, modelR)
modelUNR |
A list of estimation results created for the unrestricted model. |
modelR |
A list of estimation results created for the restricted model. |
A list LRtest containing the test results,
including the following parameters:
loglikUNRThe log-likelihood for the unrestricted model.
loglikRThe log-likelihood for the restricted model.
dfThe degrees of freedom for the test.
LRstatThe likelihood ratio test statistic.
p_LRtestThe p-value for the likelihood ratio test.
The test is calculated using the results of two calls to
FCVARestn, under the restricted and unrestricted models.
Use FCVARoptions to set default estimation options for each model,
then set restrictions as needed before FCVARestn.
Other FCVAR postestimation functions:
FCVARboot(),
GetCharPolyRoots(),
MVWNtest(),
plot.FCVAR_roots(),
summary.FCVAR_roots(),
summary.MVWN_stats()
opt <- FCVARoptions()
opt$gridSearch <- 0 # Disable grid search in optimization.
opt$dbMin <- c(0.01, 0.01) # Set lower bound for d,b.
opt$dbMax <- c(2.00, 2.00) # Set upper bound for d,b.
opt$constrained <- 0 # Impose restriction dbMax >= d >= b >= dbMin ? 1 <- yes, 0 <- no.
x <- votingJNP2014[, c("lib", "ir_can", "un_can")]
m1 <- FCVARestn(x, k = 2, r = 1, opt)
opt1 <- opt
opt1$R_psi <- matrix(c(1, 0), nrow = 1, ncol = 2)
opt1$r_psi <- 1
m1r1 <- FCVARestn(x, k = 2, r = 1, opt1)
Hdb <- FCVARhypoTest(modelUNR = m1, modelR = m1r1)
opt1 <- opt
opt1$R_Beta <- matrix(c(1, 0, 0), nrow = 1, ncol = 3)
m1r2 <- FCVARestn(x, k = 2, r = 1, opt1)
Hbeta1 <- FCVARhypoTest(m1, m1r2)
opt1 <- opt
opt1$R_Alpha <- matrix(c(0, 1, 0), nrow = 1, ncol = 3)
m1r4 <- FCVARestn(x, k = 2, r = 1, opt1)
Halpha2 <- FCVARhypoTest(m1, m1r4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.