meanVarLocalFit {MAnorm2} | R Documentation |
Fit Mean-Variance Trend by Local Regression
Description
meanVarLocalFit
fits a mean-variance curve by applying a robust,
gamma-family local regression.
Usage
meanVarLocalFit(
x,
y,
weight,
range.residual = c(1e-04, 15),
max.iter = 50,
args.lp = list(),
args.locfit = list(),
verbose = TRUE
)
Arguments
x , y |
Two numeric vectors of (sample) means and sample variances, respectively. |
weight |
An optional vector of weights to be used in the fitting
procedure. It's typically used when sample variances in |
range.residual |
A length-two vector specifying the range of residuals of non-outliers. |
max.iter |
Maximum number of iteration times allowed during the fitting procedure. |
args.lp |
A named list of extra arguments to |
args.locfit |
A named list of extra arguments to
|
verbose |
Whether to print processing messages about iteratively fitting the mean-variance curve? |
Details
meanVarLocalFit
iteratively detects outliers and applies the local
regression procedure to non-outliers. The procedure converges as soon as the
set of outlier points fixes.
Value
A prediction function which accepts a vector of means and returns the predicted variances.
Note
Due to the internal implementation, the argument subset
to
locfit
mustn't be specified in args.locfit
.
See Also
meanVarParaFit
for parametrically fitting a
mean-variance curve; fitMeanVarCurve
for an interface to
modeling the mean-variance dependence on bioCond
objects;
plotMeanVarCurve
for plotting a mean-variance curve.