Slash {VGAM}R Documentation

Slash Distribution

Description

Density function, distribution function, and random generation for the slash distribution.

Usage

dslash(x, mu=0, sigma=1, log=FALSE, smallno=.Machine$double.eps*1000)
pslash(q, mu=0, sigma=1)
rslash(n, mu=0, sigma=1)

Arguments

x, q vector of quantiles.
n number of observations. Must be a single positive integer.
mu, sigma the mean and standard deviation of the univariate normal distribution.
log Logical. If TRUE then the logarithm of the density is returned.
smallno See slash.

Details

See slash, the VGAM family function for estimating the two parameters by maximum likelihood estimation, for the formula of the probability density function and other details.

Value

dslash gives the density, and pslash gives the distribution function, rslash generates random deviates.

Note

pslash is very slow.

Author(s)

Thomas W. Yee and C. S. Chee

See Also

slash.

Examples

## Not run: 
x = seq(-5,5,length=201)
plot(x, dslash(x), type="l", col="blue", ylab="f(x)", ylim=c(0,0.4),
     main="Standard Slash, Normal and Cauchy Densities", lwd=2)
lines(x, dnorm(x), col="black", lty=2, lwd=2)
lines(x, dcauchy(x), col="red", lty=3, lwd=2)
legend(x=2, y=0.3, c("slash","normal","cauchy"), lty=1:3,
       col=c("blue","black","red"), lwd=2)

plot(x, pslash(q=x), col="blue", type="l", ylim=0:1)
## End(Not run)

[Package VGAM version 0.7-7 Index]