Learn R Programming

VGAM (version 0.8-7)

Rice: The Rice Distribution

Description

Density and random generation for the Rician distribution.

Usage

drice(x, vee, sigma, log=FALSE)rrice(n, vee, sigma)

Arguments

x
vector of quantiles.
n
number of observations. Must be a positive integer of length 1.
vee, sigma
See riceff.
log
Logical. If log=TRUE then the logarithm of the density is returned.

Value

  • drice gives the density, rrice generates random deviates.

Details

See riceff, the VGAM family function for estimating the two parameters, for the formula of the probability density function and other details.

See Also

riceff.

Examples

Run this code
x = seq(0.01, 7, len=201)
plot(x, drice(x, vee=0, sigma=1), type="n", las=1,, ylab="",
     main="Density of Rice distribution for various values of v")
sigma = 1; vee = c(0,0.5,1,2,4)
for(ii in 1:length(vee)) lines(x, drice(x, vee[ii], sigma), col=ii)
legend(x=5, y=0.6, legend=as.character(vee),
       col=1:length(vee), lty=1)

Run the code above in your browser using DataLab