impute | R Documentation |
impute
puts a given vector (usually a column vector) under a given limit of detection
(LOD) by imputing values below the LOD with a given impute scheme.
impute(v, limit, fill = "NA")
v |
The vector to impute (usually a column vector in a matrix). |
limit |
The percent of the vector to put under the LOD.
Ex: if |
fill |
The impute scheme to use for values below LOD. Takes one of the following:
|
The imputed vector.
fill
"sqrt2"
results in values below the LOD imputed as LOD/sqrt{2}
.
"-1"
results in values below the LOD imputed as -1
.
"mean"
imputes values below the LOD with the mean of those values below the LOD.
"NA"
replaces values below the LOD with NA
missing values.
"status"
is a special option that returns a vector detailing whether or not values are below the given LOD or not.
corrupt_mat
mat <- matrix(rnorm(25), 5, 5) mat[,1] <- impute(mat[,1], limit=0.4, fill="-1")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.