modelSelection {INSPEcT} | R Documentation

## Get or set parameters for model test and selection

### Description

With this methods the user can personalize the criteria by which INSPEcT selects a rate to be variable or constant. In particular, the model selection criteria can be selected between log-likelihood ratio test and Akaike's information criterion (AIC). In case log-likelihood ratio test is selected, the thresholds of chi-squared and Brown's method can be set (see Details section).

### Usage

    modelSelection(object)

    modelSelection(object) <- value

    ## S4 method for signature 'INSPEcT'
    modelSelection(object)

    ## S4 replacement method for signature 'INSPEcT'
    modelSelection(object) <- value

    ## S4 method for signature 'INSPEcT_model'
    modelSelection(object)

    ## S4 replacement method for signature 'INSPEcT_model'
    modelSelection(object) <- value

### Arguments

`object` | An object of class INSPEcT or INSPEcT_model
`value` | A list or a character that will substitute the set of parameters modelSelection: A character, either "llr" to test whether a rate is varying using log-likelihood testing framework or "aic" to choose the best model via Akaike Information Criterion (Default: "llr"). thresholds: A named list containing the thresholds for the goodness of fit (chisquare) and variability (brown) tests. Both must be comprised from 0 to 1. The goodness of fit threshold defines which models are considered valid or not (0 most stringent, 1 most permissive). The variability threshold (one per each rate) defines the stringency of the call for the variability of each rate (0 the most stringent, 1 the most permissive). When set to 0, the specific rate is excluded from the hypothesis of variability. preferPValue: when model selection is "llr", preferPValue means that if the selected model has a goodness of fit below threshold the model with the best goodness of fit is returned in place of it. When the model selection is "aic", with preferPValue the best model is tested against the closest nested models to test the hypothesis of variability and only when this pvalue is below threshold the rate is considered as varible. Otherwise the model selection is just based on the lowest AIC (Default: TRUE). padj: whether to correct pvalues with the Benjamini-Hochberg procedure or not. (Default: TRUE). limitModelComplexity: limit the complexity of the models associated to variable rates to the length of the time courses. Particularly helpful for short time series. (Default:FALSE)

### Details

When log-likelihood is chosen as a criterion for model selection, different nested models can be compared to assess wheter a single rate is varying or constant. For example, in case we want to establish whether synthesis rate is constant or not we can test the null hypothesis "all the rates are constant" against the alternative hypothesis "synthesis rate is changing". The null hypothesis is a special case of the alternative hypothesis, therefore the models are nested. We can also assess whether synthesis rate is constant or not by comparing the null hypothesis "degradation rate is changing" against the alternative hypothesis "degradation and synthesis are changing". Different comparisons will be combined using Brown's method for combinig p-values. Models are named with a short notation where synthesis is "a", degradation is "b" and processing is "c". "0" is the model where all genes are kept constant and "ab", for example is the model where synthesis rate and degradation rate are changing. The user can also set the thresholds for Brown's p-value and chi-suqared p-value. While the former set the threshold to assess whether a rate is variable or not over time, the latter set the chi-squared threshold for a pair of model to be used via the log-likelihood ratio test. In order for a pair to be used, at least one model of the pair should have a chi-squared p-value (goodness of fit) below the threshold. The construction of a synthetic data-set can help in the choice of the correct parameters for the test (`makeSimModel`, `makeSimDataset`).

### Value

See "value"

### See Also

`makeSimModel`, `makeSimDataset`

### Examples

    nascentInspObj10 <- readRDS(system.file(package='INSPEcT', 'nascentInspObj10.rds'))
    modelSelection(nascentInspObj10)
    modelSelection(nascentInspObj10)$modelSelection <- 'aic'

[Package INSPEcT version 1.12.2 Index]