View source: R/standardization.R
rm_outlier | R Documentation |
This function detects and removes outlier observations from a vector of 'theta' values using externally studentized residuals and the Bonferroni-Holm adjustment for multiple testing. It is typically used during genotype cluster center estimation to clean noisy values.
rm_outlier(data, alpha = 0.05)
data |
A data.frame containing a 'theta' column. This is usually a subset of the full dataset, representing samples within a single genotype class. |
alpha |
Significance level for identifying outliers (default is '0.05'). Observations with adjusted p-values below this threshold will be removed. |
The method fits a constant model ('theta ~ 1') and computes standardized residuals. Observations with significant deviation are flagged using the Bonferroni-Holm procedure and removed if their adjusted p-value is below the defined 'alpha' threshold.
This function was originally developed by **Kaio Olympio** and incorporated into the Qploidy workflow.
A data.frame containing only the non-outlier observations from the input. If fewer than two non-NA 'theta' values are present or if all values are identical, the input is returned unmodified.
Kaio Olympio
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.