Learn R Programming

fda (version 6.0.3)

cumfd: 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.

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.

Details

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

See Also

smooth.morph, landmarkreg, register.fd

Examples

Run this code
# NOT RUN {
#  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)
# }

Run the code above in your browser using DataLab