Error in pamr.predict
1
0
Entering edit mode
@richard-yanicky-3394
Last seen 8.2 years ago
I have an error that occurs with various dataset but always occurs with a particular dataset. The dataset is not large and has no missing values. I am using R 2.6.1 as a suggestion to isolate the error. Later versions of R can cause this error(I am told) and can confirm that this works better under 2.6.1. copied from below (The error:): > pred=pamr.predict(pamr.fit,newx=as.matrix(t(d.mv2[,pamrimp])),threshol d=Thresh) Error in diag.disc((newx - centroid.overall)/sd, delta.shrunk, prior, : (subscript) logical subscript too long If there is other information needed please let me know. > pamr.fit<-pamr.train(mydata,n.threshold=50); 1234567891011121314151617181920212223242526272829303132333435363738394 041424344454647484950> pamcv<-pamr.cv(pamr.fit,mydata); 12Fold 1 :123456789101112131415161718192021222324252627282930313233343536373839 4041424344454647484950 Fold 2 :123456789101112131415161718192021222324252627282930313233343536373839 4041424344454647484950 Fold 3 :123456789101112131415161718192021222324252627282930313233343536373839 4041424344454647484950 Fold 4 :123456789101112131415161718192021222324252627282930313233343536373839 4041424344454647484950 Fold 5 :123456789101112131415161718192021222324252627282930313233343536373839 4041424344454647484950 Fold 6 :123456789101112131415161718192021222324252627282930313233343536373839 4041424344454647484950 Fold 7 :123456789101112131415161718192021222324252627282930313233343536373839 4041424344454647484950 Fold 8 :123456789101112131415161718192021222324252627282930313233343536373839 4041424344454647484950 Fold 9 :123456789101112131415161718192021222324252627282930313233343536373839 4041424344454647484950 Fold 10 :123456789101112131415161718192021222324252627282930313233343536373839 4041424344454647484950 > > Thresh<-max(pamcv$threshold[pamcv$error== min(pamcv$error)]); > Thresh [1] 3.692809 > pamrimplist<-pamr.listgenes(fit=pamr.fit, data=mydata, threshold=Thresh,genenames=TRUE); id name 1-score 2-score [1,] 1 MMSE -1.2997 1.2759 [2,] 2 Ab1.42 -0.3874 0.3803 [3,] 3 Tau 0.2667 -0.2618 [4,] 4 P.Tau.181P 0.2084 -0.2045 [5,] 48 HIPPL.uas -0.1698 0.1667 [6,] 49 HIPPR.uas -0.1557 0.1529 [7,] 10 VENTVOL.bsi 0.1162 -0.114 [8,] 6 LEFTHIPPO.ucsfsntvol -0.0931 0.0914 [9,] 7 RIGHTHIPPO.ucsfsntvol -0.0825 0.081 [10,] 11 VENTVOL.uwo 0.0538 -0.0528 > pamrimp<-pamrimplist[,2]; > Thresh [1] 3.692809 > pred=pamr.predict(pamr.fit,newx=as.matrix(t(d.mv2[,pamrimp])),threshol d=Thresh) Error in diag.disc((newx - centroid.overall)/sd, delta.shrunk, prior, : (subscript) logical subscript too long In addition: Warning messages: 1: In newx - centroid.overall : longer object length is not a multiple of shorter object length 2: In (newx - centroid.overall)/sd : longer object length is not a multiple of shorter object length > sessionInfo() R version 2.6.1 (2007-11-26) i386-pc-mingw32 locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 attached base packages: [1] splines stats graphics grDevices utils datasets methods base other attached packages: [1] pamr_1.31 survival_2.34 cluster_1.11.9 > [[alternative HTML version deleted]]
pamr pamr • 1.8k views
ADD COMMENT
0
Entering edit mode
@herve-pages-1542
Last seen 1 day ago
Seattle, WA, United States
Hi Richard, Please update both your R and your pamr. R 2.6.1 is 1.5 year old. The current stable version is 2.8 and that's the only version supported by Bioconductor 2.3 (our current release). When you reinstall pamr (and Bioconductor packages in general), please use biocLite() so that you get the latest versions of everything + their dependencies. In particular, that will give you the latest pamr (currently 1.40.0, the pamr on CRAN is 1.31 only). See http://bioconductor.org/docs/install/ Cheers, H. Richard Yanicky wrote: > I have an error that occurs with various dataset but always occurs with a > particular dataset. The dataset is not large and has no missing values. > I am using R 2.6.1 as a suggestion to isolate the error. Later versions of R > can cause this error(I am told) and can confirm that this works better under > 2.6.1. > > copied from below (The error:): > > pred=pamr.predict(pamr.fit,newx=as.matrix(t(d.mv2[,pamrimp])),thresh old=Thresh) > Error in diag.disc((newx - centroid.overall)/sd, delta.shrunk, prior, : > (subscript) logical subscript too long > > If there is other information needed please let me know. > >> pamr.fit<-pamr.train(mydata,n.threshold=50); > 12345678910111213141516171819202122232425262728293031323334353637383 94041424344454647484950> > pamcv<-pamr.cv(pamr.fit,mydata); > 12Fold 1 > :1234567891011121314151617181920212223242526272829303132333435363738 394041424344454647484950 > Fold 2 > :1234567891011121314151617181920212223242526272829303132333435363738 394041424344454647484950 > Fold 3 > :1234567891011121314151617181920212223242526272829303132333435363738 394041424344454647484950 > Fold 4 > :1234567891011121314151617181920212223242526272829303132333435363738 394041424344454647484950 > Fold 5 > :1234567891011121314151617181920212223242526272829303132333435363738 394041424344454647484950 > Fold 6 > :1234567891011121314151617181920212223242526272829303132333435363738 394041424344454647484950 > Fold 7 > :1234567891011121314151617181920212223242526272829303132333435363738 394041424344454647484950 > Fold 8 > :1234567891011121314151617181920212223242526272829303132333435363738 394041424344454647484950 > Fold 9 > :1234567891011121314151617181920212223242526272829303132333435363738 394041424344454647484950 > Fold 10 > :1234567891011121314151617181920212223242526272829303132333435363738 394041424344454647484950 >> Thresh<-max(pamcv$threshold[pamcv$error== min(pamcv$error)]); >> Thresh > [1] 3.692809 >> pamrimplist<-pamr.listgenes(fit=pamr.fit, data=mydata, > threshold=Thresh,genenames=TRUE); > id name 1-score 2-score > [1,] 1 MMSE -1.2997 1.2759 > [2,] 2 Ab1.42 -0.3874 0.3803 > [3,] 3 Tau 0.2667 -0.2618 > [4,] 4 P.Tau.181P 0.2084 -0.2045 > [5,] 48 HIPPL.uas -0.1698 0.1667 > [6,] 49 HIPPR.uas -0.1557 0.1529 > [7,] 10 VENTVOL.bsi 0.1162 -0.114 > [8,] 6 LEFTHIPPO.ucsfsntvol -0.0931 0.0914 > [9,] 7 RIGHTHIPPO.ucsfsntvol -0.0825 0.081 > [10,] 11 VENTVOL.uwo 0.0538 -0.0528 >> pamrimp<-pamrimplist[,2]; >> Thresh > [1] 3.692809 > pred=pamr.predict(pamr.fit,newx=as.matrix(t(d.mv2[,pamrimp])),thresh old=Thresh) > Error in diag.disc((newx - centroid.overall)/sd, delta.shrunk, prior, : > (subscript) logical subscript too long > In addition: Warning messages: > 1: In newx - centroid.overall : > longer object length is not a multiple of shorter object length > 2: In (newx - centroid.overall)/sd : > longer object length is not a multiple of shorter object length >> sessionInfo() > R version 2.6.1 (2007-11-26) > i386-pc-mingw32 > > locale: > LC_COLLATE=English_United States.1252;LC_CTYPE=English_United > States.1252;LC_MONETARY=English_United > States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 > > attached base packages: > [1] splines stats graphics grDevices utils datasets methods > base > > other attached packages: > [1] pamr_1.31 survival_2.34 cluster_1.11.9 > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor -- Hervé Pagès Program in Computational Biology Division of Public Health Sciences Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N, M2-B876 P.O. Box 19024 Seattle, WA 98109-1024 E-mail: hpages at fhcrc.org Phone: (206) 667-5791 Fax: (206) 667-1319
ADD COMMENT

Login before adding your answer.

Traffic: 558 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6