hredestig / pcaMethods

Perform PCA on data with missing values in R
GNU General Public License v2.0
45 stars 10 forks source link

Way too big imputations #20

Open iquasere opened 1 year ago

iquasere commented 1 year ago

Running, on this dataset, these commands

library("pcaMethods")
df <- read.table('norm.tsv', header=TRUE, sep="\t", row.names=1)
imputed = llsImpute(t(norm), correlation = "pearson", allVariables = TRUE)
t(completeObs(imputed))

Gives me some very strange results, with numbers that are bigger than the sum of the non imputted data. E.g., df["A0A090I5T7",] returns

      CS1       CS2       CS3       CS4       CS5       CS6
       NA        NA        NA        NA        NA 0.6316226

and after imputation is

         CS1          CS2          CS3          CS4          CS5          CS6
   0.3368018    0.4863894    0.2958871    0.4730441 1686.0216401    0.6316226

What happened to sample CS5?

hredestig commented 1 year ago

Cheers for the feedback. I don't have much bandwidth to work on this project but happy to review contributions.