ContrastsFirth | R Documentation |
Estimate contrasts using Wald Test
Estimate contrasts using Wald Test
prolfqua::ContrastsInterface
-> ContrastFrith
models
Model
contrasts
character with contrasts
contrastfun
function to compute contrasts
subject_Id
name of column containing e.g., protein Id's
p.adjust
function to adjust p-values (default prolfqua::adjust_p_values)
contrast_result
data frame containing results of contrast computation
contrastfun
function to compute contrasts
new()
initialize create Contrast
ContrastsFirth$new( model, contrasts, p.adjust = prolfqua::adjust_p_values, modelName = "WaldTestFirth" )
model
a dataframe with a structure similar to that generated by build_model
contrasts
a character vector with contrast specificiation
p.adjust
function to adjust the p-values
modelName
name of contrast method, default WaldTest
get_contrast_sides()
get both sides of contrasts
ContrastsFirth$get_contrast_sides()
get_linfct()
get linear functions from contrasts
ContrastsFirth$get_linfct(avg = TRUE)
avg
logical TRUE - get also linfct for averages
get_contrasts()
get table with contrast estimates
ContrastsFirth$get_contrasts(all = FALSE)
all
should all columns be returned (default FALSE)
data.frame with contrasts
get_Plotter()
return ContrastsPlotter
creates Contrast_Plotter
ContrastsFirth$get_Plotter(FCthreshold = 1, FDRthreshold = 0.1)
FCthreshold
fold change threshold to show in plots
FDRthreshold
FDR threshold to show in plots
ContrastsPlotter
to_wide()
convert to wide format
ContrastsFirth$to_wide(columns = c("p.value", "FDR", "statistic"))
columns
value column default p.value
data.frame
clone()
The objects of this class are cloneable with this method.
ContrastsFirth$clone(deep = FALSE)
deep
Whether to make a deep clone.
Other modelling:
Contrasts
,
ContrastsMissing
,
ContrastsModerated
,
ContrastsPlotter
,
ContrastsProDA
,
ContrastsROPECA
,
ContrastsTable
,
INTERNAL_FUNCTIONS_BY_FAMILY
,
LR_test()
,
Model
,
ModelFirth
,
build_model()
,
build_model_logistf()
,
contrasts_fisher_exact()
,
generate_contrasts()
,
generate_contrasts_for_factor()
,
get_anova_df()
,
get_complete_model_fit()
,
get_p_values_pbeta()
,
group_label()
,
interaction_contrasts()
,
isSingular_lm()
,
level_specific_contrasts()
,
linfct_all_possible_contrasts()
,
linfct_factors_contrasts()
,
linfct_from_model()
,
linfct_matrix_contrasts()
,
main_effect_contrasts()
,
merge_contrasts_results()
,
model_analyse()
,
model_summary()
,
moderated_p_limma()
,
moderated_p_limma_long()
,
my_contest()
,
my_contrast()
,
my_contrast_V1()
,
my_contrast_V2()
,
my_glht()
,
pivot_model_contrasts_2_Wide()
,
plot_lmer_peptide_predictions()
,
process_factor()
,
sim_build_models_lm()
,
sim_build_models_lmer()
,
sim_build_models_logistf()
,
sim_make_model_lm()
,
sim_make_model_lmer()
,
strategy_logistf()
,
summary_ROPECA_median_p.scaled()
modi <- sim_build_models_logistf(model = "parallel3", weight_missing = 1)
contrasts <- c(Avs = "group_A - group_B", AvsCtrl = "group_A - group_Ctrl")
ctr <- ContrastsFirth$new(modi,contrasts)
ctr$get_contrast_sides()
ctr$get_linfct()
ctr$get_contrasts()
mod3 <- sim_build_models_logistf(model = "parallel3", weight_missing = 1, peptide=TRUE)
# ContrastsFirth$debug("get_contrasts")
ctrpep <- ContrastsFirth$new(mod3,contrasts)
ctrpep$get_contrast_sides()
ctrpep$get_linfct()
ctrpep$get_contrasts()
pl <- ctrpep$get_Plotter()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.