cumfd: Compute a Cumulative Distribution Functional Data Object

View source: R/cumfd.R

cumfdR Documentation

Compute a Cumulative Distribution Functional Data Object

Description

Function smooth.morph() maps a sorted set of variable values inside a closed interval into a set of equally-spaced probabilities in [0,1].

Usage

cumfd(xrnd, xrng, nbreaks=7, nfine=101)

Arguments

xrnd

A vector of variable unsorted values.

xrng

A vector of length 2 containing the boundary values.

nbreaks

The number of knots to use to define object WfdPar in function smooth.morph().

nfine

The number of equally spaced values spanning xrng.

Details

Only the values of x within the interior of xrng are used in order to avoid distortion due to boundary inflation or deflation.

Value

A named list of length 2 containing:

Wfdobj

a functional data object defining function $W(x)$ that that optimizes the fit to the data of the monotone function that it defines.

cdffine

a vector of length nfine of an equally spaced mesh of values for the cumulative distribution function.

References

Ramsay, James O., Hooker, Giles, and Graves, Spencer (2009), Functional data analysis with R and Matlab, Springer, New York.

Ramsay, James O., and Silverman, Bernard W. (2005), Functional Data Analysis, 2nd ed., Springer, New York.

Ramsay, James O., and Silverman, Bernard W. (2002), Applied Functional Data Analysis, Springer, New York.

See Also

smooth.morph, landmarkreg, register.fd

Examples

#  see the use of smooth.morph in landmarkreg.R
xrnd <- rbeta(50, 2, 5)
xrng <- c(0,1)
hist(xrnd)
range(xrnd)
cdfd <- cumfd(xrnd, xrng)

fda documentation built on Sept. 30, 2024, 9:19 a.m.