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

weitrix_dispersions(weitrix, design = ~1)



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


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.


A numeric vector.


# Using a model just containing an intercept weitrix_dispersions(simwei, ~1)
#> [1] 8.4502127 1.0996830 5.8355689 1.5487826 6.7697559 0.8004038 8.8250603
# Allowing for one component of variation, the dispersions are lower comp <- weitrix_components(simwei, p=1, verbose=FALSE) weitrix_dispersions(simwei, comp)
#> [1] 1.00572717 0.52016063 0.23905883 0.72427872 0.32754560 1.04775487 0.09847095