apply multcomp::glht method to linfct

my_glht(model, linfct, sep = TRUE)

Examples


mb <- sim_make_model_lm( "interaction")
#> creating sampleName from fileName column
#> completing cases
#> Joining with `by = join_by(protein_Id)`
linfct <- linfct_from_model(mb)
names(linfct)
#> [1] "linfct_factors"      "linfct_interactions"
my_glht(mb, linfct$linfct_factors)
#> # A tibble: 4 × 10
#>   contrast    null.value estimate std.error statistic adj.p.value conf.low
#>   <chr>            <dbl>    <dbl>     <dbl>     <dbl>       <dbl>    <dbl>
#> 1 BackgroundX          0     18.6     0.322      57.8    4.44e-16     17.9
#> 2 BackgroundZ          0     18.2     0.322      56.4    6.66e-16     17.5
#> 3 TreatmentA           0     18.8     0.322      58.2    4.44e-16     18.1
#> 4 TreatmentB           0     18.1     0.322      56.1    6.66e-16     17.4
#> # ℹ 3 more variables: conf.high <dbl>, df <int>, sigma <dbl>

m <-  sim_make_model_lm( "factors")
#> creating sampleName from fileName column
#> completing cases
#> Joining with `by = join_by(protein_Id)`
linfct <- linfct_from_model(m)$linfct_factors
my_glht(m, linfct)
#> # A tibble: 4 × 10
#>   contrast    null.value estimate std.error statistic adj.p.value conf.low
#>   <chr>            <dbl>    <dbl>     <dbl>     <dbl>       <dbl>    <dbl>
#> 1 BackgroundX          0     18.6     0.551      33.8    4.62e-14     17.4
#> 2 BackgroundZ          0     18.2     0.551      33.0    6.29e-14     17.0
#> 3 TreatmentA           0     18.8     0.551      34.1    4.26e-14     17.6
#> 4 TreatmentB           0     18.1     0.551      32.8    6.83e-14     16.9
#> # ℹ 3 more variables: conf.high <dbl>, df <int>, sigma <dbl>