dIC(G, nodeset, crit = "BIC", NS=NULL)
dIC
is The penalized likelihood criterion, IC(A) = -2(A) + alpha*dim(A), where
dim(A) is the number of free parameters under A, and 'alpha' is a tuning parameter.
For the AIC, alpha=2 and for the BIC, alpha= log(N). BIC penalises the parameters more heavily and
so selects simpler models.The difference in IC is d(IC) = IC(A_0) - IC(A) = G^2 - alpha*df\ where A_0 is the APFA obtained after merging the two nodes in A, G^2 is the deviance statistic and d.f. is the associated degrees of freedom.
Ankinakatte, S. and Edwards, D. Modelling discrete longitudinal data using acyclic probabilistic finite automata. Submitted to C.S.D.A.
library(gRapfa)
data(Wheeze)
G <- st(Wheeze)
G.c <- contract.last.level(G)
dic1 <- dIC(G.c, nodeset=c(5,3))
dic2 <- dIC(G.c, nodeset=c(6,4))
Run the code above in your browser using DataLab