Skip to contents

Encodes missingness as a binary response and fits the peptide-aware Firth logistic backend. Proteins with multiple child features are fitted with the lowest hierarchy key appended to the formula.

Usage

build_model_glm_peptide(lfqdata, modelstr)

Arguments

lfqdata

nested LFQData object

modelstr

model formula string without the response variable (e.g. "~ group_")

Value

a ModelFirth object

Examples

istar <- sim_lfq_data_peptide_config(Nprot = 10, with_missing = TRUE, weight_missing = 0.5, seed = 3)
#> creating sampleName from fileName column
#> completing cases
#> completing cases done
#> setup done
lfqdata <- LFQData$new(istar$data, istar$config)
mod <- build_model_glm_peptide(lfqdata, "~ group_")
#> completing cases
#> Joining with `by = join_by(protein_Id)`
#> Joining with `by = join_by(protein_Id)`
#> Joining with `by = join_by(protein_Id)`
#> Joining with `by = join_by(protein_Id)`
head(mod$get_coefficients())
#> # A tibble: 6 × 11
#> # Groups:   protein_Id [2]
#>   protein_Id factor  Estimate se.coef. lower.0.95 upper.0.95 Chisq      p method
#>   <chr>      <chr>      <dbl>    <dbl>      <dbl>      <dbl> <dbl>  <dbl>  <dbl>
#> 1 7IZdVV~08… (Inte…  2.10e+ 0    0.950      0.439      4.49  6.53  0.0106      2
#> 2 7IZdVV~08… group…  6.77e- 1    0.786     -0.937      2.51  0.669 0.413       2
#> 3 7IZdVV~08… group… -6.66e- 1    0.645     -2.08       0.640 0.990 0.320       2
#> 4 AZPG26~20… (Inte…  9.05e- 1    0.863     -0.729      2.90  1.15  0.284       2
#> 5 AZPG26~20… group…  2.23e-16    1.02      -2.09       2.09  0     1           2
#> 6 AZPG26~20… group…  1.82e+ 0    1.55      -0.855      6.80  1.67  0.197       2
#> # ℹ 2 more variables: isSingular <lgl>, nrcoef <int>