Moderate Extreme Negative Outliers with Random Values within Noise
Source:R/DataTransformation.R
NormAF.Rd
This function moderates extreme negative outliers in the specified variables of a FlowObject by replacing these values with random numbers. These random numbers are drawn from a normal distribution determined by the data lying within the `negative_gate_def` thresholds in the FlowObject. It is typically used to handle outliers in flow cytometry data after defining negative gates using the DefineNegative function.
Arguments
- x
A FlowObject that has already been processed using DefineNegative.
- var
A character vector specifying the variables (markers) in the FlowObject for which the moderation of extreme negative values should be performed. If NULL, the user is prompted to select variables interactively.
- output
The output directory name for output files
- plot
Logical, whether to produce diagnotic plots.
Value
A modified FlowObject in which extreme negative values in the specified variables are replaced with random numbers based on the distribution of values within the defined negative gates. This modification is intended to reduce the impact of extreme outliers on subsequent analyses.
See also
Other Data Transformation:
DefineNegatives()
,
LogData()
,
PlotDefineNegatives()
,
PlotNormAF()
Examples
if (FALSE) { # \dontrun{
# Assuming 'x' is a valid FlowObject with required preprocessing:
x <- NormAF(x, var = c("marker1", "marker2"))
} # }