Macdonald: Compute the Macdonald density function for a specified...

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

View source: R/Macdonald.R

Description

Compute the Macdonald density function for a specified parameter value m at a vector of x values.

Usage

1
Macdonald(x, m)

Arguments

x

The x ordinates that you want to evaluate the density at. A vector of real numbers.

m

The parameter of the Macdonald's density

Details

This function computes the Macdonald probability density function for parameter m and values at which to evaluate the density supplied in x. The mean and variance of this density is zero and one respectively.

Value

The density

Author(s)

Delyan Savchev and Guy Nason

References

Nason, G.P. and Savchev, D. (2014) White noise testing using wavelets. Stat, 3, 351-362. http://dx.doi.org/10.1002/sta4.69

See Also

compute.rejection, hwwn.test

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#
# Work out density at x=0, 0.5 and 1 for the m=1 Macdonald density
#
Macdonald(x=c(0,0.5,1), m=2)
#[1] 0.3535534 0.2975933 0.2075131
#
# Check that the density integrates to one, e.g. for m=3
#
integrate(Macdonald, lower=-20, upper=20, m=3)
#1 with absolute error < 4.7e-07

hwwntest documentation built on May 29, 2017, 7:22 p.m.