Modify ncomp = min(ncol(X),nrow(X),ncomp) for the matrix with nrow(X)<ncol(X)
SVDmiss2(X, niter = 200, ncomp = dim(X)[2], conv.reldiff = 0.001)
X
Data matrix, with missing values marked by 'NA'.
niter
Maximum number of iterations to run before exiting, 'Inf' will run until the 'conv.reldiff' criteria is met.
ncomp
Number of SVD components to use in the reconstruction (>0).
conv.reldiff
Assume the iterative procedure has converged when the relative difference between two consecutive iterations is less than 'conv.reldiff'.
See SpatioTemporal:: SVDmiss for details
See SVDmiss(package:SpatioTemporal) for details.