competeModels {TPP2D} | R Documentation

## Compete H0 and H1 models per protein and obtain F statistic

### Description

Compete H0 and H1 models per protein and obtain F statistic

### Usage

    competeModels(df, fcThres = 1.5, independentFiltering = FALSE,
      minObs = 20, optim_fun_h0 = .min_RSS_h0,
      optim_fun_h1 = .min_RSS_h1_slope_pEC50, optim_fun_h1_2 = NULL,
      gr_fun_h0 = NULL, gr_fun_h1 = NULL, gr_fun_h1_2 = NULL,
      maxit = 750)

### Arguments

`df` | tidy data frame retrieved after import of a 2D-TPP dataset, potential filtering and addition of a column "nObs" containing the number of observations per protein
`fcThres` | numeric value of minimal fold change (or inverse fold change) a protein has to show to be kept upon independent filtering
`independentFiltering` | boolean flag indicating whether independent filtering should be performed based on minimal fold changes per protein profile
`minObs` | numeric value of minimal number of observations that should be required per protein
`optim_fun_h0` | optimization function that should be used for fitting the H0 model
`optim_fun_h1` | optimization function that should be used for fitting the H1 model
`optim_fun_h1_2` | optional additional optimization function that will be run with paramters retrieved from optim_fun_h1 and should be used for fitting the H1 model with the trimmed sum model, default is NULL
`gr_fun_h0` | optional gradient function for optim_fun_h0, default is NULL
`gr_fun_h1` | optional gradient function for optim_fun_h1, default is NULL
`gr_fun_h1_2` | optional gradient function for optim_fun_h1_2, default is NULL
`maxit` | maximal number of iterations the optimization should be given, default is set to 500

### Value

data frame summarising the fit characteristics of H0 and H1 models and therof resulting computed F statistics per protein

### Examples

    data("simulated_cell_extract_df")
    temp_df <- simulated_cell_extract_df %>%
      filter(clustername %in% paste0("protein", 1:10)) %>%
      group_by(representative) %>%
      mutate(nObs = n()) %>%
      ungroup
    competeModels(temp_df)

[Package TPP2D version 1.4.1 Index]