getSgsResultsDf.Rd
Extracts content of slot @results of screening S4 objects. For
a more detailed explanation of what the slot contains see the documentation
of SpatialGradientScreening
.
getSgsResultsDf(object, ...)
# S4 method for class 'SpatialGradientScreening'
getSgsResultsDf(
object,
eval = "mae",
pval = "fdr",
arrange_by = eval,
threshold_eval = 0.25,
threshold_pval = 0.05,
model_subset = NULL,
model_remove = NULL,
best_only = TRUE,
as_is = FALSE
)
Any object for which a method has been defined.
Character value. The evaluation variable to use. Either 'mae' (Mean Absolute Error) or 'rmse' (Root Mean Squared Error).
Character value. The p-value variable. Defaults to 'fdr' (False Discovery Rate).
Numeric values. The threshold with which the results are filtered. Default is 1. Since p-values and model fit evaluation scores range from 0-1 (with 1 being worst), the default includes everything.
Logical value. If TRUE
, only the best gradient-model fit according
to the chosen evaluation metric (eval
) for each screened variable is kept.
Logical value. If TRUE
, all parameters are ignored and the $significance
and $model_fits data.frames are simply joined and return without any filtering.
A data.frame with results of the spatial gradient screening conducted. Column names are:
variables The name of the variable to which the row corresponds.
models The name of the model which fits best to the inferred gradient.
mae The mean absolute error of the gradient-model fit.
rmse The root mean squared error of the gradient-model fit.
p_value The p-value regarding the hypothesis whether such a gradient can be obtained under random circumstances.
fdr The adjusted p-value using false discovery rate.
Data.frame.
Without any argument specification the function getSgsResultsDf()
returns
the complete data.frame. The arguments can be used to filter the results. Filtering
works as follows:
Model-fits are filtered according to the input of model_subset
and model_remove
.
Model-fits are filtered according to the threshold_
arguments.
If best_only
is set to TRUE, model-fits are filtered such that the best model-fit
(among the remaining models from 1.) for every gene remains. E.g. if gene GFAP fits to model
descending_linear with a score of 0.2 and to descending_gradual with an MAE score of
0.15 the model-fit GFAP-descending_gradual remains in the output.
The output is arranged by the evaluation score.