Dispersions are estimated using
A trend line is then fitted to the dispersions using a gamma GLM
with log link function.
Weitrix weights are calibrated based on this trend line.
A weitrix object, or an object that can be converted to a weitrix
A formula in terms of
A formula specification for predicting log dispersion from columns of rowData(weitrix). If absent, metadata(weitrix)$weitrix$calibrate_trend_formula is used.
A SummarizedExperiment object with metadata fields marking it as a weitrix.
Several columns are added to the
deg_free Degrees of freedom for dispersion calculation.
dispersion_before Dispersion before calibration.
dispersion_trend Fitted dispersion trend.
dispersion_after Dispersion for these new weights.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
rowData(simwei)$total_weight <- rowSums(weitrix_weights(simwei)) # To estimate dispersions, use a simple model containing only an intercept # term. Model log dispersion as a straight line relationship with log total # weight and adjust weights to remove any trend. cal <- weitrix_calibrate_trend(simwei,~1,trend_formula=~log(total_weight)) # This dataset has few rows, so calibration like this is dubious. # Predictors in the fitted model are not significant. summary( metadata(cal)$weitrix$trend_fit ) # Information about the calibration is added to rowData rowData(cal) # A Components object may also be used as the design argument. comp <- weitrix_components(simwei, p=1, verbose=FALSE) cal2 <- weitrix_calibrate_trend(simwei,comp,trend_formula=~log(total_weight)) rowData(cal2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.