Rice Distribution Family Function
riceff.RdEstimates the two parameters of a Rice distribution by maximum likelihood estimation.
Usage
riceff(lsigma = "loglink", lvee = "loglink", isigma = NULL,
ivee = NULL, nsimEIM = 100, zero = NULL, nowarning = FALSE)Arguments
- nowarning
Logical. Suppress a warning? Ignored for VGAM 0.9-7 and higher.
- lvee, lsigma
Link functions for the \(v\) and \(\sigma\) parameters. See
Linksfor more choices and for general information.- ivee, isigma
Optional initial values for the parameters. If convergence failure occurs (this VGAM family function seems to require good initial values) try using these arguments. See
CommonVGAMffArgumentsfor more information.- nsimEIM, zero
See
CommonVGAMffArgumentsfor information.
Details
The Rician distribution has density function $$f(y;v,\sigma) = \frac{y}{\sigma^2} \, \exp(-(y^2+v^2) / (2\sigma^2)) \, I_0(y v / \sigma^2) $$ where \(y > 0\), \(v > 0\), \(\sigma > 0\) and \(I_0\) is the modified Bessel function of the first kind with order zero. When \(v = 0\) the Rice distribution reduces to a Rayleigh distribution. The mean is \(\sigma \sqrt{\pi/2} \exp(z/2) ((1-z) I_0(-z/2)-z I_1(-z/2))\) (returned as the fitted values) where \(z=-v^2/(2 \sigma^2)\). Simulated 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.
References
Rice, S. O. (1945). Mathematical Analysis of Random Noise. Bell System Technical Journal, 24, 46–156.
Note
Convergence problems may occur for data where \(v=0\);
if so, use rayleigh or possibly use an
identity link.
When \(v\) is large (greater than 3, say) then the mean is approximately \(v\) and the standard deviation is approximately \(\sigma\).
Examples
if (FALSE) sigma <- exp(1); vee <- exp(2)
rdata <- data.frame(y = rrice(n <- 1000, sigma, vee = vee))
#> Error in rnorm(n, mean = vee * cos(theta), sd = sigma): invalid arguments
fit <- vglm(y ~ 1, riceff, data = rdata, trace = TRUE, crit = "c")
#> Error in eval(mf, parent.frame()): object 'rdata' not found
c(with(rdata, mean(y)), fitted(fit)[1])
#> Error: object 'rdata' not found
coef(fit, matrix = TRUE)
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'coef': object 'fit' not found
Coef(fit)
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'Coef': object 'fit' not found
summary(fit)
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': object 'fit' not found
# \dontrun{}