linfct_from_model: get linfct from model

View source: R/tidyMS_R6_Modelling.R

linfct_from_modelR Documentation

get linfct from model

Description

get linfct from model

Usage

linfct_from_model(m, as_list = TRUE)

Arguments

m

linear model

See Also

Other modelling: Contrasts, ContrastsMissing, ContrastsModerated, ContrastsPlotter, ContrastsProDA, ContrastsROPECA, ContrastsTable, INTERNAL_FUNCTIONS_BY_FAMILY, LR_test(), Model, build_model(), build_models(), contrasts_fisher_exact(), get_anova_df(), get_complete_model_fit(), get_p_values_pbeta(), isSingular_lm(), linfct_all_possible_contrasts(), linfct_factors_contrasts(), linfct_matrix_contrasts(), make_model(), 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_model_and_data(), plot_lmer_peptide_noRandom(), plot_lmer_peptide_predictions(), plot_lmer_predicted_interactions(), strategy_lmer(), summary_ROPECA_median_p.scaled()

Examples


m <- prolfqua_data('data_basicModel_p1807')
# debug(linfct_from_model)
linfct <- linfct_from_model(m)

linfct$linfct_factors
linfct$linfct_interactions

m <- prolfqua_data('data_interactionModel_p1807')
# debug(.coeff_weights_factor_levels)
linfct <- linfct_from_model(m)

all.equal(linfct$linfct_factors["CelltypeCMP/MEP",] ,
 apply(linfct$linfct_interactions[grep("CelltypeCMP/MEP", rownames(linfct$linfct_interactions)),],2, mean))
linfct$linfct_interactions

m <- lm(Petal.Width ~ Species, data = iris)
linfct_from_model(m)
xx <- data.frame( Y = 1:10 , Condition = c(rep("a",5), rep("b",5)) )
m <- lm(Y ~ Condition, data = xx)
linfct_from_model(m)
xx <- data.frame( Y = 1:10 , Condition = c(rep("a",5), rep("b.b",5)) )
m <- lm(Y ~ Condition, data = xx)
linfct_from_model(m)
xx <- data.frame( Y = 1:10 , Condition = c(rep("a",5), rep("ab",5)) )
m <- lm(Y ~ Condition, data = xx)
linfct_from_model(m)


wolski/prolfqua documentation built on May 12, 2024, 10:16 p.m.