Learn R Programming

PearsonDS (version 1.3.1)

Pearson0: The Pearson Type 0 (aka Normal) Distribution

Description

Density, distribution function, quantile function and random generation for the Pearson type 0 (aka Normal) distribution.

Usage

dpearson0(x, mean, sd, params, log = FALSE)

ppearson0(q, mean, sd, params, lower.tail = TRUE, log.p = FALSE)

qpearson0(p, mean, sd, params, lower.tail = TRUE, log.p = FALSE)

rpearson0(n, mean, sd, params)

Value

dpearson0 gives the density, ppearson0 gives the distribution function, qpearson0 gives the quantile function, and rpearson0

generates random deviates.

Arguments

x, q

vector of quantiles.

p

vector of probabilities.

n

number of observations.

mean

location parameter (and expectation)

sd

scale parameter (and standard deviation)

params

optional vector/list containing distribution parameters mean and sd (in this order!). Overrides parameters mean and sd, if given.

log, log.p

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

lower.tail

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

Details

Distributions of type 0 have been added to the Pearson Distribution system in order to have the normal distributions not only nested as limits of other distribution types. The functions are only wrappers for dnorm, pnorm, qnorm and rnorm contained in package stats.

References

See the references in Normal.

See Also

Normal, PearsonDS-package, Pearson

Examples

Run this code
## define Pearson type 0 parameter set with mean=-1, sd=2
p0pars <- list(mean=-1, sd=2)
## calculate probability density function
dpearson0(-4:1,params=p0pars)
## calculate cumulative distribution function
ppearson0(-4:1,params=p0pars)
## calculate quantile function
qpearson0(seq(0.1,0.9,by=0.2),params=p0pars)
## generate random numbers
rpearson0(5,params=p0pars)

Run the code above in your browser using DataLab