- using R Under development (unstable) (2012-02-27 r58511)
- using platform: x86_64-pc-mingw32 (64-bit)
- using session charset: ISO8859-1
- checking for file 'glmnet/DESCRIPTION' ... OK
- checking extension type ... Package
- this is package 'glmnet' version '1.7.3'
- checking package namespace information ... OK
- checking package dependencies ... OK
- checking if this is a source package ... OK
- checking if there is a namespace ... OK
- checking whether package 'glmnet' can be installed ... OK
- checking installed package size ... OK
- checking package directory ... OK
- checking for portable file names ... OK
- checking DESCRIPTION meta-information ... OK
- checking top-level files ... OK
- checking index information ... OK
- checking package subdirectories ... OK
- checking R files for non-ASCII characters ... OK
- checking R files for syntax errors ... OK
- loading checks for arch 'i386'
** checking whether the package can be loaded ... OK
** checking whether the package can be loaded with stated dependencies ... OK
** checking whether the package can be unloaded cleanly ... OK
** checking whether the namespace can be loaded with stated dependencies ... OK
** checking whether the namespace can be unloaded cleanly ... OK
- loading checks for arch 'x64'
** checking whether the package can be loaded ... OK
** checking whether the package can be loaded with stated dependencies ... OK
** checking whether the package can be unloaded cleanly ... OK
** checking whether the namespace can be loaded with stated dependencies ... OK
** checking whether the namespace can be unloaded cleanly ... OK
- checking for unstated dependencies in R code ... OK
- checking S3 generic/method consistency ... OK
- checking replacement functions ... OK
- checking foreign function calls ... OK
- checking R code for possible problems ... OK
- checking Rd files ... OK
- checking Rd metadata ... OK
- checking Rd cross-references ... OK
- checking for missing documentation entries ... OK
- checking for code/documentation mismatches ... OK
- checking Rd \usage sections ... OK
- checking Rd contents ... OK
- checking for unstated dependencies in examples ... OK
- checking line endings in C/C++/Fortran sources/headers ... OK
- checking line endings in Makefiles ... OK
- checking for portable compilation flags in Makevars ... OK
- checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
- checking compiled code ... NOTE
File 'd:/Rcompile/CRANpkg/lib/2.15/glmnet/libs/i386/glmnet.dll':
Found 'abort', possibly from 'abort' (C)
Found 'exit', possibly from 'exit' (C), 'stop' (Fortran)
File 'd:/Rcompile/CRANpkg/lib/2.15/glmnet/libs/x64/glmnet.dll':
Found 'abort', possibly from 'abort' (C)
Found 'exit', possibly from 'exit' (C), 'stop' (Fortran)
Compiled code should not call functions which might terminate R nor
write to stdout/stderr instead of to the console. The detected symbols
are linked into the code but might come from libraries and not actually
be called.
See 'Writing portable packages' in the 'Writing R Extensions' manual.
- checking sizes of PDF files under 'inst/doc' ... OK
- checking installed files from 'inst/doc' ... OK
- checking examples ...
** running examples for arch 'i386' ... ERROR
Running examples in 'glmnet-Ex.R' failed
The error most likely occurred in:
> ### Name: cv.glmnet
> ### Title: Cross-validation for glmnet
> ### Aliases: cv.glmnet
> ### Keywords: models regression
>
> ### ** Examples
>
> set.seed(1010)
> n=1000;p=100
> nzc=trunc(p/10)
> x=matrix(rnorm(n*p),n,p)
> beta=rnorm(nzc)
> fx= x[,seq(nzc)] %*% beta
> eps=rnorm(n)*5
> y=drop(fx+eps)
> px=exp(fx)
> px=px/(1+px)
> ly=rbinom(n=length(px),prob=px,size=1)
> set.seed(1011)
> cvob1=cv.glmnet(x,y)
> plot(cvob1)
> coef(cvob1)
101 x 1 sparse Matrix of class "dgCMatrix"
1
(Intercept) -0.114499004
V1 -0.249682465
V2 0.354656099
V3 0.000000000
V4 -0.250595374
V5 -0.220882137
V6 0.281975536
V7 0.226455138
V8 -1.389842399
V9 1.055440917
V10 0.185144685
V11 0.000000000
V12 0.000000000
V13 0.000000000
V14 0.000000000
V15 0.000000000
V16 0.000000000
V17 0.000000000
V18 -0.008251507
V19 0.000000000
V20 0.000000000
V21 0.000000000
V22 0.000000000
V23 0.000000000
V24 0.000000000
V25 0.000000000
V26 0.029472478
V27 0.000000000
V28 0.000000000
V29 0.000000000
V30 0.000000000
V31 0.000000000
V32 0.000000000
V33 0.000000000
V34 0.000000000
V35 .
V36 0.000000000
V37 0.000000000
V38 0.000000000
V39 0.000000000
V40 0.000000000
V41 0.000000000
V42 0.000000000
V43 0.000000000
V44 0.000000000
V45 0.000000000
V46 0.000000000
V47 0.000000000
V48 0.000000000
V49 0.000000000
V50 0.000000000
V51 0.000000000
V52 0.000000000
V53 0.000000000
V54 0.000000000
V55 0.000000000
V56 0.000000000
V57 0.000000000
V58 0.000000000
V59 0.000000000
V60 0.000000000
V61 0.000000000
V62 0.000000000
V63 0.000000000
V64 0.000000000
V65 0.000000000
V66 0.000000000
V67 0.000000000
V68 0.000000000
V69 0.000000000
V70 0.000000000
V71 0.000000000
V72 0.000000000
V73 0.000000000
V74 0.000000000
V75 -0.177175572
V76 0.000000000
V77 0.000000000
V78 0.000000000
V79 0.000000000
V80 0.000000000
V81 0.000000000
V82 0.000000000
V83 0.000000000
V84 0.000000000
V85 0.000000000
V86 0.000000000
V87 0.000000000
V88 0.000000000
V89 0.000000000
V90 0.000000000
V91 0.000000000
V92 0.000000000
V93 0.000000000
V94 0.000000000
V95 0.000000000
V96 0.000000000
V97 0.000000000
V98 0.000000000
V99 0.000000000
V100 0.000000000
> predict(cvob1,newx=x[1:5,], s="lambda.min")
1
[1,] -1.3447658
[2,] 0.9443441
[3,] 0.6989746
[4,] 1.8698290
[5,] -4.7372693
> title("Gaussian Family",line=2.5)
> set.seed(1011)
> cvob1a=cv.glmnet(x,y,type.measure="mae")
> plot(cvob1a)
> title("Gaussian Family",line=2.5)
> set.seed(1011)
> par(mfrow=c(2,2),mar=c(4.5,4.5,4,1))
> cvob2=cv.glmnet(x,ly,family="binomial")
> plot(cvob2)
> title("Binomial Family",line=2.5)
> frame()
> set.seed(1011)
> cvob3=cv.glmnet(x,ly,family="binomial",type.measure="class")
> plot(cvob3)
> title("Binomial Family",line=2.5)
> set.seed(1011)
> cvob3a=cv.glmnet(x,ly,family="binomial",type.measure="auc")
> plot(cvob3a)
> title("Binomial Family",line=2.5)
> set.seed(1011)
> mu=exp(fx/10)
> y=rpois(n,mu)
> cvob4=cv.glmnet(x,y,family="poisson")
> plot(cvob4)
> title("Poisson Family",line=2.5)
> # Multinomial
> n=1000;p=30
> nzc=trunc(p/10)
> x=matrix(rnorm(n*p),n,p)
> beta3=matrix(rnorm(30),10,3)
> beta3=rbind(beta3,matrix(0,p-10,3))
> f3=x%*% beta3
> p3=exp(f3)
> p3=p3/apply(p3,1,sum)
> g3=rmult(p3)
> set.seed(10101)
> cvfit=cv.glmnet(x,g3,family="multinomial")
** running examples for arch 'x64' ... OK