handle_na_values | R Documentation |
Handle NA values in a numeric matrix
handle_na_values(
x,
idesign,
handle_na = c("full1", "full", "partial", "none", "all"),
na_value = 0,
na_weight = 0,
return_weights = FALSE,
verbose = FALSE,
...
)
x |
|
idesign |
|
handle_na |
|
na_value |
|
na_weight |
|
return_weights |
|
verbose |
|
... |
additional arguments are ignored. |
This function provides reasonable alternatives intended to
manage the presence of missing data encoded as NA
values
in a numeric matrix.
The alternatives are defined by argument handle_na
:
"full"
: Retain NA
values, except when an entire group is NA
it is replaced with na_value
. This option is intended for sparse data
where non-NA values are accepted as real measurements
for each group, and where a group with all NA values should be
retained for statistical contrasts by assigning na_value
.
This method essentially keeps the data as-is, except when groups
are otherwise entirely NA
the value na_value
is used in
order to retain any relevant contrasts that involve this group.
"full1"
: Similar to "full"
, retain NA
values, except
when an entire group is NA
, then replace only one entry
with na_value
. This option is intended to keep data as-is,
except to retain groups that are otherwise entirely NA
.
In these groups, only one na_value
is used in order to
prevent the group from contributing toward group variability
or dispersion calculations.
"partial"
: Replace NA
values with na_value
, except
when an entire group is NA
the entire group is kept at NA
.
"all"
: Replace all NA
values with na_value
.
"none"
: Perform no replacement of NA
values.
numeric
matrix with equal dimensions as input x
,
where NA
values have been handled as defined by handle_na
.
Other jamses stats:
ebayes2dfs()
,
format_hits()
,
hit_array_to_list()
,
process_sestats_to_hitim()
,
run_limma_replicate()
,
save_sestats()
,
se_contrast_stats()
,
sestats_to_dfs()
,
sestats_to_df()
,
voom_jam()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.