modSwap(object, how = "fp", percent = 10, theta = 1)
"modSwap"(object, how = "fp", percent = 10, theta = 1)
ExprsBinary
object to mutate.ExprsBinary
object. See Details.ExprsBinary
object containing mutated subjects with an index
appended to the $mutated
column of the @annot
slot.
ExprsBinary
: A method to mutate ExprsBinary
objects.
ExprsBinary
subjects. The "rp.1" method randomizes subject vectors to create "subject noise".
The "rp.2" method creates a new subject vector by randomly sampling feature values
from the respective feature vector. The "fp" method creates a new subject vector
by randomly sampling feature values from the respective control feature vector.The "ng" and "tg" methods create out-groups by defining new means for each feature.
These methods yield fixed distributions around new feature means such that
the mean of all new feature means remains constant. The argument theta
dictates how much the new feature mean might differ from the original feature mean
(where larger theta
values lead to more similar new feature means). For
the "ng" method, the mean of new feature means equals that of the original features
for case subjects only. On the other hand, for the "tg" method, the mean of new
feature means equals that of the original features for all subjects.
Alternatively, by providing another ExprsBinary
object as the how
argument, this function will swap a percentage of case subjects from the main dataset
with control subjects from the second dataset.