dropAIC.fun {NHPoisson} | R Documentation |
Calculate the AIC for all one-covariate deletions from the current model
Description
This function fits all models obtained from the current model by deleting one covariate (except the intercept), and calculates their AIC value. It selects the best covariate to be deleted, according to the AIC value.
Usage
dropAIC.fun(mlePP, modSim = FALSE,...)
Arguments
mlePP |
A |
modSim |
Logical flag. If it is FALSE, information about the process is shown on the screen. For automatic selection processes, the option TRUE should be preferred. |
... |
Further arguments to pass to |
Details
The definition of AIC uses constant k=2, but a different value k can be passed as an additional argument. The best covariate to be deleted is the one whose deletion leads to the model with the lowest AIC value and it improves the current model if the new AIC is lower than the current one.
Value
A list with the following components
AICadd |
Vector of the AIC values obtained from deleting each covariate of the current model. |
posminAIC |
An integer indicating the number of the column of the covariates matrix with the covariate leading to the minimum AIC. |
namecov |
Name of the covariate leading to the minimum AIC. |
AICcurrent |
AIC value of the current (initial) model. |
References
Casella, G. and Berger, R.L., (2002). Statistical inference. Brooks/Cole.
Cebrian, A.C., Abaurrea, J. and Asin, J. (2015). NHPoisson: An R Package for Fitting and Validating Nonhomogeneous Poisson Processes. Journal of Statistical Software, 64(6), 1-24.
Venables, W. N. and Ripley, B. D. (2002). Modern Applied Statistics with S. Fourth edition. Springer.
See Also
addAIC.fun
, stepAICmle.fun
, LRTpv.fun
Examples
data(BarTxTn)
BarEv<-POTevents.fun(T=BarTxTn$Tx,thres=318,
date=cbind(BarTxTn$ano,BarTxTn$mes,BarTxTn$dia))
covB<-cbind(cos(2*pi*BarTxTn$dia/365), sin(2*pi*BarTxTn$dia/365),
BarTxTn$TTx,BarTxTn$Txm31,BarTxTn$Txm31**2)
dimnames(covB)<-list(NULL,c('cos','sin','TTx','Txm31', 'Txm31**2'))
mod1B<-fitPP.fun(covariates=covB, posE=BarEv$Px, inddat=BarEv$inddat,
tit="BAR Tx; cos, sin, TTx, Txm31, Txm31**2",
start=list(b0=-100,b1=1,b2=10,b3=0,b4=0,b5=0))
aux<-dropAIC.fun(mod1B)