Slash {VGAM} | R Documentation |
Density function, distribution function, and random generation for the slash distribution.
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)
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 .
|
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.
dslash
gives the density, and
pslash
gives the distribution function,
rslash
generates random deviates.
pslash
is very slow.
Thomas W. Yee and C. S. Chee
## 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)