hzetaUC: Haight's Zeta Distribution

Description Usage Arguments Details Value Note Author(s) See Also Examples

Description

Density, distribution function, quantile function and random generation for Haight's zeta distribution with parameter shape.

Usage

1
2
3
4
dhzeta(x, shape, log = FALSE)
phzeta(q, shape, log.p = FALSE)
qhzeta(p, shape)
rhzeta(n, shape)

Arguments

x, q, p, n

Same meaning as runif.

shape

The positive shape parameter. Called alpha below.

log,log.p

Same meaning as in pnorm or qnorm.

Details

The probability function is

f(x) = (2x-1)^(-alpha) - (2x+1)^(-alpha),

where alpha>0 and x=1,2,....

Value

dhzeta gives the density, phzeta gives the distribution function, qhzeta gives the quantile function, and rhzeta generates random deviates.

Note

Given some response data, the VGAM family function hzeta estimates the parameter shape.

Author(s)

T. W. Yee and Kai Huang

See Also

hzeta, zeta, zetaff, simulate.vlm.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
dhzeta(1:20, 2.1)
rhzeta(20, 2.1)

round(1000 * dhzeta(1:8, 2))
table(rhzeta(1000, 2))

## Not run:  shape <- 1.1; x <- 1:10
plot(x, dhzeta(x, shape = shape), type = "h", ylim = 0:1, lwd = 2,
     sub = paste("shape =", shape), las = 1, col = "blue", ylab = "Probability",
     main = "Haight's zeta: blue = density; orange = distribution function")
lines(x+0.1, phzeta(x, shape = shape), col = "orange", lty = 3, lwd = 2,
      type = "h")

## End(Not run)

VGAM documentation built on Jan. 16, 2021, 5:21 p.m.