Correlation matrix and pca on matrix with NA values
3
0
Entering edit mode
Daniel Brewer ★ 1.9k
@daniel-brewer-1791
Last seen 10.2 years ago
I have an expression matrix that contains NA values. What is the best way to get: 1) prcomp() (Exits with "Error in svd(x, nu = 0) : infinite or missing values in 'x'") 2) cor() (Exits with "Error in cor(exprs(Sperger)) : missing observations in cov/cor") to work with this type of matrix. Many Thanks Dan -- ************************************************************** Daniel Brewer, Ph.D. Institute of Cancer Research Email: daniel.brewer at icr.ac.uk ************************************************************** The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Registered in England under Company No. 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP. This e-mail message is confidential and for use by the addre...{{dropped}}
Cancer Cancer • 11k views
ADD COMMENT
0
Entering edit mode
Aedin Culhane ▴ 510
@aedin-culhane-1526
Last seen 5.2 years ago
United States
Hi Dan You could use nipals PCA. NIPALS analysis allows PCA of data sets with missing values. R code is available from http://biom3.univ-lyon1.fr/R/html/additifs.html Aedin
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 2 days ago
United States
Hi Daniel, Daniel Brewer wrote: > I have an expression matrix that contains NA values. What is the best > way to get: > 1) prcomp() (Exits with "Error in svd(x, nu = 0) : infinite or missing > values in 'x'") > 2) cor() (Exits with "Error in cor(exprs(Sperger)) : missing > observations in cov/cor") > to work with this type of matrix. Take a look at the pcaMethods package. Best, Jim > > Many Thanks > > Dan > -- James W. MacDonald, M.S. Biostatistician Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623 ********************************************************** Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues.
ADD COMMENT
0
Entering edit mode
@wolfram-stacklies-2104
Last seen 10.2 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20070411/ 810bfa53/attachment.pl
ADD COMMENT
0
Entering edit mode
That works well. Thanks. I am happy to stick with that, but I still do not understand why I get the error message "Error in svd(x, nu = 0) : infinite or missing values in 'x'", because looking at prcomp it should omit those genes that contain NA values when na.action=na.omit. I am interested in sample PCR, so there should be plenty of information left to do this. Any ideas? Dan Wolfram Stacklies wrote: > Hi Daniel, > > I am the maintainer of the pcaMethods package. The package provides several > PCA implementations that can handle missing data, so this should solve your > problem. Maybe you want to have a look at the ppca (probabilistic pca), > from > my experience it produces nice results. > You should take care about the amount of missing data, or or rows / > columns that > contain large numbers of missing values. For these the estimation may not be > very accurate (as there is little information to base the estimate on). > Better remove > them first... > If there are further questions I will be happy to answer them. > There will be a new release of the package coming with the new Bioconductor > release. This version contains many improvements, maybe you want to have > a look. > > Regards, > Wolfram > > > On 4/10/07, *Daniel Brewer* <daniel.brewer at="" icr.ac.uk=""> <mailto:daniel.brewer at="" icr.ac.uk="">> wrote: > > I have an expression matrix that contains NA values. What is the best > way to get: > 1) prcomp() (Exits with "Error in svd(x, nu = 0) : infinite or missing > values in 'x'") > 2) cor() (Exits with "Error in cor(exprs(Sperger)) : missing > observations in cov/cor") > to work with this type of matrix. > > Many Thanks > > Dan -- ************************************************************** Daniel Brewer, Ph.D. Institute of Cancer Research ************************************************************** The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Registered in England under Company No. 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP. This e-mail message is confidential and for use by the addre...{{dropped}}
ADD REPLY

Login before adding your answer.

Traffic: 626 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