weitrix_calibrate {weitrix} | R Documentation

## Adjust weights row-wise based on given row dispersions

### Description

Based on estimated row dispersions, adjust weights in each row.

### Usage

    weitrix_calibrate(weitrix, dispersions)

### Arguments

`weitrix` | A weitrix object, or an object that can be converted to a weitrix with `as_weitrix`.
`dispersions` | A dispersion for each row.

### Details

For large numbers of samples this can be based directly on weitrix_dispersions. For small numbers of samples, when using limma, it should be based on a trend-line fitted to known co-variates of the dispersions. This can be done using `weitrix_calibrate_trend`.

### Value

A SummarizedExperiment object with metadata fields marking it as a weitrix.

### Examples

    # Adjust weights so dispersion for each row is exactly 1. This is dubious
    # for a small dataset, but would be fine for a dataset with many columns.
    comp <- weitrix_components(simwei, p=1, verbose=FALSE)
    disp <- weitrix_dispersions(simwei, comp)
    cal <- weitrix_calibrate(simwei, disp)
    weitrix_dispersions(cal, comp)

[Package weitrix version 1.4.0 Index]