| sim_lod | R Documentation |
sim_lod() simulates putting the columns of a given matrix D under a limit
of detection (LOD) by calculating the given quantile q of each column and
corrupting all values < the quantile to NA, returning the newly corrupted
matrix, the binary corruption mask, and a vector of column LODs.
sim_lod(D, q)
D |
The input data matrix. |
q |
A double in the range |
A list containing:
D_tilde: The original matrix D corrupted with < LOD NA values.
tilde_mask: A binary matrix of dim(D) specifying the locations of
corrupted entries (1) and uncorrupted entries (0).
lod: A vector with length(lod) == ncol(D) providing the simulated
LOD values corresponding to each column in the D_tilde.
sim_na(), impute_matrix(), sim_data()
D <- sim_data(5, 5, sigma = 0.8)$D
D
sim_lod(D, q = 0.2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.