Description Usage Arguments Value Author(s) See Also Examples
Computes precision weights that account for heteroscedasticity in RNA-seq count data based on non-parametric local linear regression estimates.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | sp_weights(
y,
x,
phi = NULL,
use_phi = TRUE,
preprocessed = FALSE,
gene_based = FALSE,
bw = c("nrd", "ucv", "SJ", "nrd0", "bcv"),
kernel = c("gaussian", "epanechnikov", "rectangular", "triangular", "biweight",
"tricube", "cosine", "optcosine"),
exact = FALSE,
transform = TRUE,
verbose = TRUE,
na.rm = FALSE
)
|
y |
a numeric matrix of size |
x |
a numeric matrix of size |
phi |
a numeric design matrix of size |
use_phi |
a logical flag indicating whether conditional means should be
conditioned on |
preprocessed |
a logical flag indicating whether the expression data have
already been preprocessed (e.g. log2 transformed). Default is |
gene_based |
a logical flag indicating whether to estimate weights at the
gene-level. Default is |
bw |
a character string indicating the smoothing bandwidth selection
method to use. See |
kernel |
a character string indicating which kernel should be used.
Possibilities are |
exact |
a logical flag indicating whether the non-parametric weights
accounting for the mean-variance relationship should be computed exactly or
extrapolated from the interpolation of local regression of the mean against
the variance. Default is |
transform |
a logical flag indicating whether values should be
transformed to uniform for the purpose of local linear smoothing. This may be
helpful if tail observations are sparse and the specified bandwidth gives
suboptimal performance there. Default is |
verbose |
a logical flag indicating whether informative messages are
printed during the computation. Default is |
na.rm |
logical: should missing values (including |
a list containing the following components:
weights
: a matrix n x G
containing the computed precision
weights
plot_utilities
: a list containing the following elements:
reverse_trans
: a function encoding the reverse function used
for smoothing the observations before computing the weights
method
: the weight computation method ("loclin"
)
smth
: the vector of the smoothed values computed
gene_based
: a logical indicating whether the computed
weights are based on average at the gene level or on individual
observations
mu
: the transformed observed counts or averages
v
: the observed variability estimates
Boris Hejblum
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.