nakagami {VGAM} | R Documentation |
Nakagami Regression Family Function
Description
Estimation of the two parameters of the Nakagami distribution by maximum likelihood estimation.
Usage
nakagami(lscale = "loglink", lshape = "loglink", iscale = 1,
ishape = NULL, nowarning = FALSE, zero = "shape")
Arguments
nowarning |
Logical. Suppress a warning? |
lscale , lshape |
Parameter link functions applied to the
scale and shape parameters.
Log links ensure they are positive.
See |
iscale , ishape |
Optional initial values for the shape and scale parameters.
For |
zero |
Details
The Nakagami distribution, which is useful for modelling wireless systems such as radio links, can be written
for ,
,
.
The mean of
is
and these are returned as the fitted values.
By default, the linear/additive predictors are
and
.
Fisher scoring is implemented.
Value
An object of class "vglmff"
(see vglmff-class
).
The object is used by modelling functions such as vglm
,
and vgam
.
Note
The Nakagami distribution is also known as the
Nakagami-m distribution, where here.
Special cases:
is a one-sided Gaussian
distribution and
is a Rayleigh distribution.
The second moment is
.
If has a Nakagami distribution with parameters
shape and scale then
has a gamma
distribution with shape parameter shape and scale
parameter scale/shape.
Author(s)
T. W. Yee
References
Nakagami, M. (1960). The m-distribution: a general formula of intensity distribution of rapid fading, pp.3–36 in: Statistical Methods in Radio Wave Propagation. W. C. Hoffman, Ed., New York: Pergamon.
See Also
Examples
nn <- 1000; shape <- exp(0); Scale <- exp(1)
ndata <- data.frame(y1 = sqrt(rgamma(nn, shape = shape, scale = Scale/shape)))
nfit <- vglm(y1 ~ 1, nakagami, data = ndata, trace = TRUE, crit = "coef")
ndata <- transform(ndata, y2 = rnaka(nn, scale = Scale, shape = shape))
nfit <- vglm(y2 ~ 1, nakagami(iscale = 3), data = ndata, trace = TRUE)
head(fitted(nfit))
with(ndata, mean(y2))
coef(nfit, matrix = TRUE)
(Cfit <- Coef(nfit))
## Not run: sy <- with(ndata, sort(y2))
hist(with(ndata, y2), prob = TRUE, main = "", xlab = "y", ylim = c(0, 0.6),
col = "lightblue")
lines(dnaka(sy, scale = Cfit["scale"], shape = Cfit["shape"]) ~ sy,
data = ndata, col = "orange")
## End(Not run)