simSVD simulates various models for the errors in the data matrix, and summarize
performance of a singular value decomposition algorithm under presence or absence of
outlying data introduced through various outlying schemes, using Monte Carlo approach.
simSVD(
trueSVD,
svdfun,
B = 100,
seed = NULL,
dist = "normal",
tau = 0.95,
outlier = FALSE,
out_method = "element",
out_value = 10,
out_prop = 0.1,
return_details = FALSE,
...
)Based on whether return_details is TRUE or FALSE, returns a list with two or one components.
Simulations :
Lambda - A matrix containing obtained singular values from all Monte Carlo Simulations.
Left - A matrix containing the dissimilarities between left singular vectors of true SVD and obtained SVD.
Right - A matrix containing the dissimilarities between right singular vectors of true SVD and obtained SVD.
Summary :
Bias - A numeric vector showing biases of the singular vectors obtained by svdfun algorithm.
MSE - A numeric vector showing MSE of the singular vectors obtained by svdfun algorithm.
Variance - A numeric vector showing variances of the singular vectors obtained by svdfun algorithm.
Left - A numeric vector showing average dissimilarities between true and estimated left singular vectors.
Right - A numeric vector showing average dissimilarities between true and estimated right singular vectors.
If return_details is FALSE, only Summary component of the larger list is returned.
list, containing three different named components.
d - a vector containing the singular values.
u - a matrix with left singular vectors, each column being a singular vector.
v - a matrix with right singular vectors, each column being a singular vector.
function which takes a numeric matrix as first argument and
returns singular value decomposition of it as a list, with three components
d, u and v as indicated before.
numeric, denoting the number of Monte Carlo simulation.
numeric, a seed value used for reproducibility.
character string, denoting the distribution from which errors will be generated.
It must be equal to one of the following: normal, cauchy,
exp, logis, lognormal
numeric, a value between 0 and 1, see details for more.
logical, if TRUE, simulates the situation by adding outliers.
character, the method to add outliers. Must be one of "element", "row" or "col". See AddOutlier for details.
numeric, the outlying observation. See AddOutlier for details.
a numeric, between 0 and 1 denoting the proportion of contamination. See AddOutlier for details.
logical, whether to return detailed results for each Monte Carlo simulation. See value for details.
extra arguments to be passed to svdfun function.