R: Ratio of Normal Mixture to Corresponding Normal
r.norMix
R Documentation
Ratio of Normal Mixture to Corresponding Normal
Description
Compute r(x) = f(x)/ f0(x) where f() is a normal mixture
density and f0 the normal density with the same mean and
variance as f.
Usage
r.norMix(obj, x = NULL, xlim = NULL, n = 511, xy.return = TRUE)
Arguments
obj
an object of class norMix.
x
numeric vector with abscissa values where to evaluate the
density. Default is constructed from n (and xlim if
specified).
xlim
range of abscissa values, used if x == NULL. By default,
xlim taken as mean plus/minus 3 standard deviations of the normal mixture.
n
number of abscissa values to generate if x is not specified.
xy.return
logical indicating if the result should be a list or
just a numeric vector, see below.
Value
It depends on xy.return. If it's false, a numeric vector of
the same length as x, if true (as per default), a list that can
be plotted, with components
x
abscissa values corresponding to argument x.
y
corresponding values r(x).
f0
values of the moment matching normal density f0(x).
Note
The ratio function is used in certain semi-parametric density
estimation methods (and theory).