weitrix_dispersions: Calculate row dispersions

Description Usage Arguments Value Examples

View source: R/calibrate.R

Description

Calculate the dispersion of each row. For each observation, this value divided by the weight gives the observation's variance.

Usage

1
weitrix_dispersions(weitrix, design = ~1)

Arguments

weitrix

A weitrix object, or an object that can be converted to a weitrix with as_weitrix.

design

A formula in terms of colData(weitrix or a design matrix, which will be fitted to the weitrix on each row. Can also be a pre-existing Components object, in which case the existing fits (design$row) are used.

Value

A numeric vector.

Examples

1
2
3
4
5
6
# Using a model just containing an intercept
weitrix_dispersions(simwei, ~1)

# Allowing for one component of variation, the dispersions are lower
comp <- weitrix_components(simwei, p=1, verbose=FALSE)
weitrix_dispersions(simwei, comp)

weitrix documentation built on Nov. 8, 2020, 8:10 p.m.