bg__shift_size: Shift Size Parameter

View source: R/Simulations_Functions.R

bg__shift_sizeR Documentation

Shift Size Parameter

Description

Shifts a fitted size paramter according to the a power-law relationship.

Usage

	bg__shift_size(mu_all, size_all, mu_group, coeffs) 

Arguments

mu_all

vector of original mus

size_all

vector of original sizes

mu_group

vector of new mus

coeffs

coefficients of the power-law fit

Details

Wrapper of short function which converts values to their logs then shifts them using the parameters of a linear fit before un-logging them.

Value

vector of new size parameters

Examples

#require("M3DExampleData")
#counts <- NBumiConvertData(Mmus_example_list$data, is.counts=TRUE);
#fit <- NBumiFitModel(counts);
#ceoffs <- NBumiFitDispVsMean(fit, suppress.plot=TRUE)
#new_size <- bg__shift_size(rowMeans(counts), fit$size, rowMeans(counts)*2, coeffs)

tallulandrews/M3Drop documentation built on March 6, 2024, 1:49 a.m.