R Under development (unstable) (2025-09-04 r88794 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(capushe) > data(datacapushe) > > AICcapushe(datacapushe,10) $model [1] "K=3" $AIC [1] 6.62071 > BICcapushe(datacapushe,10) $model [1] "K=3" $BIC [1] 6.83252 > > # AICcapushe(datacapushe,-5) > # BICcapushe(datacapushe,-5) > # AICcapushe(datacapushe,pi) > # BICcapushe(datacapushe,pi) > # AICcapushe(datacapushe,Inf) > # BICcapushe(datacapushe,Inf) > # AICcapushe(datacapushe,"a") > # BICcapushe(datacapushe,"a") > > dataNan=datacapushe > dataNan[2,3]=NaN > AICcapushe(dataNan,10) $model [1] "K=3" $AIC [1] 6.62071 Warning message: In AICcapushe(dataNan, 10) : 1 line has been removed by AICcapushe > BICcapushe(dataNan,10) $model [1] "K=3" $BIC [1] 6.83252 Warning message: In BICcapushe(dataNan, 10) : 1 line has been removed by BICcapushe > dataNan[15,1]=NaN > AICcapushe(dataNan,10) $model [1] "K=3" $AIC [1] 6.62071 Warning message: In AICcapushe(dataNan, 10) : 1 line has been removed by AICcapushe > BICcapushe(dataNan,10) $model [1] "K=3" $BIC [1] 6.83252 Warning message: In BICcapushe(dataNan, 10) : 1 line has been removed by BICcapushe > dataNan[15,3]=NaN > AICcapushe(dataNan,10) $model [1] "K=3" $AIC [1] 6.62071 Warning message: In AICcapushe(dataNan, 10) : 2 lines have been removed by AICcapushe > BICcapushe(dataNan,10) $model [1] "K=3" $BIC [1] 6.83252 Warning message: In BICcapushe(dataNan, 10) : 2 lines have been removed by BICcapushe > dataNan[8:50,4]=rep(NaN,43) > AICcapushe(dataNan,10) $model [1] "K=3" $AIC [1] 6.62071 Warning message: In AICcapushe(dataNan, 10) : 44 lines have been removed by AICcapushe > BICcapushe(dataNan,10) $model [1] "K=3" $BIC [1] 6.83252 Warning message: In BICcapushe(dataNan, 10) : 44 lines have been removed by BICcapushe > dataNan[1:50,4]=rep(NaN,50) > # AICcapushe(dataNan,10) > # BICcapushe(dataNan,10) > > > > datacomplex=datacapushe > datacomplex[4,3]=-3 > # AICcapushe(datacomplex,10) > # BICcapushe(datacomplex,10) > datacomplex[4,3]=0.001 > AICcapushe(datacomplex,10) $model [1] "K=4" $AIC [1] 5.17479 > BICcapushe(datacomplex,10) $model [1] "K=4" $BIC [1] 5.174805 > > datapen=datacapushe > datapen[6,]=datapen[5,] > datapen[6,4]=0.005 > AICcapushe(datapen,10) $model [1] "K=5" $AIC [1] 2.405 > BICcapushe(datapen,10) $model [1] "K=5" $BIC [1] 2.768102 > > datacontrast=datacapushe > datacontrast[6,4]=-3 > AICcapushe(datacontrast,10) $model [1] "K=6" $AIC [1] -0.1 > > proc.time() user system elapsed 0.17 0.04 0.21