regZIC.test | R Documentation |
Test whether two ZIC values differ significantly based on minimum ZIC for regression data.
regZIC.test(model1,model2,model_ZIC="AIC",data,alpha=0.05)
model1 |
an object of class “lm". |
model2 |
an object of class “lm". |
model_ZIC |
type of the information criterion, it can be "AIC", "BIC", or "AICc" (Default is the "AIC"). |
data |
a matrix of |
alpha |
significance level |
Consider the hypothesis: Under the null hypothesis that the two expected discrepancies are equal.
H_0: ZIC_i=ZIC_j , H_1: ZIC_i\neq ZIC_j
Z_0=\frac{(\hat{ZIC_i}-\hat{ZIC_j})-0}{\sqrt{SD(ZIC_i,ZIC_j)}}\sim N(0,1)
is calculated empirically.
p-value with significance status.
Linhart, H. (1988). A test whether two AIC's differ significantly. South African Statistical Journal, 22(2), 153-161.
library(ConfZIC)
data(Concrete)
x=Concrete
Y=x[,9] #dependent variable
#independent variables
X1=x[,1];X2=x[,2];X3=x[,3];X4=x[,4];
X5=x[,5];X6=x[,6];X7=x[,7];X8=x[,8];
mydata=cbind(Y,X1,X2,X3,X4,X5,X6,X7,X8) #data matrix
model1=lm(Y~X1); model2=lm(Y~X1+X2)
regZIC.test(model1,model2,model_ZIC="BIC",data=mydata,alpha=0.05)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.