# cumfd: Compute a Cumulative Distribution Functional Data Object In fda: Functional Data Analysis

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

`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 June 25, 2022, 5:05 p.m.