# NOT RUN {
library(RMLPCA)
data(data_clean)
data(data_error_d)
# covariance matrix
data(cov_d)
data(data_cleaned_mlpca_d)
# data that you will usually have on hands
data_noisy <- data_clean + data_error_d
# run mlpca_c with rank p = 5
results <- RMLPCA::mlpca_d(
X = data_noisy,
Cov = cov_d,
p = 2
)
# estimated clean dataset
data_cleaned_mlpca <- results$U %*% results$S %*% t(results$V)
# }
Run the code above in your browser using DataLab