[combat] Re: Error in FUN(newX[, i], ...) : missing observations in cov/c
1
0
Entering edit mode
@w-evan-johnson-5447
Last seen 6 months ago
United States
Are you using the 'sva' package version or the R script? On May 10, 2013, at 1:51 PM, Marc-Danie Jessica Nazaire wrote: Hi Igor, We are getting this error when running ComBat with no covariates specified (runs successfully with covariates) but there are no non- numeric or missing values in our dataset. I did some debugging and tracked down the error to this piece of code: if (!NAs){gamma.hat <- solve(t(batch.design)%*%batch.design)%*%t(batch .design)%*%t(as.matrix(s.data))}else{gamma.hat=apply(s.data,1,Beta.NA, batch.design)} NOTE: s.data and batch.design have no NAs The gamma.hat matrix has NAs after this calculation and fails later during the call: gamma.bar <- apply(gamma.hat, 1, mean) Do you have any more ideas or insights on what could be causing this error? Thanks, Marc-Danie On Tuesday, June 9, 2009 2:57:40 PM UTC-4, Evan wrote: If you see the "Error in FUN(newX[, i], ...) : missing observations in cov/cor" error message while running ComBat, search for non-numeric or missing values in your data file. It will work fine when you fixed them. Igor -- [[alternative HTML version deleted]]
• 1.0k views
ADD COMMENT
0
Entering edit mode
@marc-danie-jessica-nazaire-5933
Last seen 10.3 years ago
No, I am not. Marc-Danie On Friday, May 10, 2013 1:57:50 PM UTC-4, Evan Johnson wrote: > > Are you using the 'sva' package version or the R script? > > > On May 10, 2013, at 1:51 PM, Marc-Danie Jessica Nazaire wrote: > > Hi Igor, > > We are getting this error when running ComBat with no covariates > specified (runs successfully with covariates) but there are no non- numeric > or missing values in our dataset. > > I did some debugging and tracked down the error to this piece of code: > if (!NAs){gamma.hat <- > solve(t(batch.design)%*%batch.design)%*%t(batch.design)%*%t(as.matri x(s.data))}else{gamma.hat=apply(s.data,1,Beta.NA,batch.design)} > > NOTE: s.data and batch.design have no NAs > > The gamma.hat matrix has NAs after this calculation and fails later during > the call: > gamma.bar <- apply(gamma.hat, 1, mean) > > > Do you have any more ideas or insights on what could be causing this > error? > > Thanks, > Marc-Danie > > On Tuesday, June 9, 2009 2:57:40 PM UTC-4, Evan wrote: >> >> If you see the "Error in FUN(newX[, i], ...) : missing observations in >> cov/cor" error message while running ComBat, search for non-numeric >> or >> missing values in your data file. It will work fine when you fixed >> them. >> >> Igor > > > -- > > >

Login before adding your answer.

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