Density, distribution function, quantile function and random generation for multivariate point distribution.

dmpoint(x, location, log = FALSE)

rmpoint(n, location)

pmpoint(q, location, lower.tail = TRUE, log.p = FALSE)

qmpoint(p, location, lower.tail = TRUE, log.p = FALSE)

Arguments

x, q

vector or matrix of quantiles.

location

vector of locations corresponding to the location of individual points. Alternatively, a matrix with rows corresponding to the location of individual samples and columns correspond to the location of individual points.

log, log.p

logical; if TRUE, probabilities p are given as log(p).

n

number of observations.

lower.tail

logical; if TRUE (default), probabilities are \(P[X \le x]\), otherwise, \(P[X \ge x]\).

p

vector of probabilities.

Value

dpoint gives the density, ppoint gives the distribution function, qpoint gives the quantile function, and rpoint generates random deviates.

Examples

# draw samples from a multivariate point distribution
rmpoint(10, location = c(0, 1))
#>       [,1] [,2]
#>  [1,]    0    1
#>  [2,]    0    1
#>  [3,]    0    1
#>  [4,]    0    1
#>  [5,]    0    1
#>  [6,]    0    1
#>  [7,]    0    1
#>  [8,]    0    1
#>  [9,]    0    1
#> [10,]    0    1