Package ConfZIC provides methods to narrow down the number of models to look at in model selection based on Generalized Information Criteria for regression and time-series data.
Installation can be done for “ConfZIC” R package in three ways.
From the Comprehensive R Archive Network (CRAN): Use install.packages() function in R. Then, import ConfZIC package into working session using library() function. That is,
library(ConfZIC)
The primary functions in this package are and . these functions help us to narrow down the number of models to look at in model selection, uses the minimum ZIC (Generalized Information Criteria)
More Details: Jayaweera I.M.L.N, Trindade A.A., ``How Certain are You in Your Minimum AIC and BIC Values?“, Sankhya A (2023+)
Rank the regression models which lie in the given confidence envelope:
library("ConfZIC")
data(Concrete)
=Concrete
x=x[,9] #dependent variable
Y#independent variables
=x[,1];X2=x[,2];X3=x[,3];X4=x[,4];
X1=x[,5];X6=x[,6];X7=x[,7];X8=x[,8];
X5=cbind(Y,X1,X2,X3,X4,X5,X6,X7,X8) #data matrix
mydataRankReg(mydata,0.95,"BIC")
#> Fixed term is "(Intercept)"
#> $Ranked_Models
#> BIC Models
#> [1,] "7.5703169" "'c(0, 1, 2, 3, 4, 5, 8)'"
#> [2,] "7.5714442" "'c(0, 1, 2, 3, 4, 8)'"
#> [3,] "7.576645" "'c(0, 1, 2, 3, 4, 5, 6, 8)'"
#> [4,] "7.5767138" "'c(0, 1, 2, 3, 4, 7, 8)'"
#> [5,] "7.5767901" "'c(0, 1, 2, 3, 4, 5, 7, 8)'"
#> [6,] "7.5778869" "'c(0, 1, 2, 3, 4, 6, 8)'"
#>
#> $Confidence_Envelope
#> [1] 7.579471
#>
#> $Confidence_Limit
#> [1] 0.95
#>
#> $Total_Models
#> [1] 256
Testing two ZIC values in Regression
=Concrete
x=x[,9] #dependent variable
Y=lm(Y~X1)
model1=lm(Y~X1+X2)
model2regZIC.test(model1,model2,model_ZIC="BIC",data=mydata,alpha=0.05)
#> p-value is 0, and test is significant at level 0.05
Rank the time series models which lie in the given confidence envelope based on minimum ZIC:
library("ConfZIC")
data(Sunspots)
=Sunspots
xRankTS(x,max.p=13,max.q=13,0.95,"AICc")
#> $Ranked_Models
#> AICc ARcoef MAcoef
#> [1,] 824.5326 6 12
#> [2,] 824.5843 13 0
#> [3,] 824.7624 11 1
#>
#> $Confidence_Envelope
#> [1] 824.7757
#>
#> $Confidence_Limit
#> [1] 0.95
#>
#> $Total_Models
#> [1] 196
Testing two ZIC values:
=try(arima(x,order=c(1,0,1),method="ML",include.mean=FALSE),silent = TRUE)
model1=try(arima(x,order=c(1,0,0),method="ML",include.mean=FALSE),silent = TRUE)
model2tsZIC.test(x,model1,model2,model_ZIC="AIC",alpha=0.05)
#> p-value is 0, and test is significant at level 0.05