# cond.F: Conditional Distribution Function In fda.usc: Functional Data Analysis and Utilities for Statistical Computing

 cond.F R Documentation

## Conditional Distribution Function

### Description

Calculate the conditional distribution function of a scalar response with functional data.

### Usage

```cond.F(
fdata0,
y0,
fdataobj,
y,
h = 0.15,
g = 0.15,
metric = metric.lp,
Ker = list(AKer = AKer.epa, IKer = IKer.epa),
...
)
```

### Arguments

 `fdata0` Conditional explanatory functional data of `fdata` class. `y0` Vector of conditional response with length `n`. `fdataobj` `fdata` class object. `y` Vector of scalar response with length `nn`. `h` Smoothing parameter or bandwidth of response `y`. `g` Smoothing parameter or bandwidth of explanatory functional data `fdataobj`. `metric` Metric function, by default `metric.lp`. `Ker` List of 2 arguments. The fist argument is a character string that determines the type of asymetric kernel (see `Kernel.asymmetric`). Asymmetric Epanechnikov kernel is selected by default. The second argumentis a string that determines the type of integrated kernel(see `Kernel.integrate`). Integrate Epanechnikov kernel is selected by default.. `...` Further arguments passed to or from other methods.

### Details

If `x.dist=NULL` the distance matrix between `fdata` objects is calculated by function passed in `metric` argument.

### Value

• Fc Conditional distribution function.

• y0 Vector of conditional response.

• g Smoothing parameter or bandwidth of explanatory functional data (`fdataobj`).

• h Smoothing parameter or bandwidth of respone, `y`.

• x.dist Distance matrix between curves of `fdataobj` object.

• xy.dist Distance matrix between cuves of `fdataobj` and `fdata0` objects.

### Author(s)

Manuel Febrero-Bande, Manuel Oviedo de la Fuente manuel.oviedo@udc.es

### References

Ferraty, F. and Vieu, P. (2006). Nonparametric functional data analysis. Springer Series in Statistics, New York.

See Also as: `cond.mode` and `cond.quantile`.

### Examples

```## Not run:
n= 500
t= seq(0,1,len=101)
beta = t*sin(2*pi*t)^2
x = matrix(NA, ncol=101, nrow=n)
y=numeric(n)
x0<-rproc2fdata(n,seq(0,1,len=101),sigma="wiener")
x1<-rproc2fdata(n,seq(0,1,len=101),sigma=0.1)
x<-x0*3+x1
fbeta = fdata(beta,t)
y<-inprod.fdata(x,fbeta)+rnorm(n,sd=0.1)
prx=x[1:100];pry=y[1:100]
ind=101;ind2=102:110
pr0=x[ind];pr10=x[ind2,]
ndist=61
gridy=seq(-1.598069,1.598069, len=ndist)

# Conditional Function
res1 = cond.F(pr10, gridy, prx, pry,p=1)
res2 = cond.F(pr10, gridy, prx, pry,h=0.3)
res3 = cond.F(pr10, gridy, prx, pry,g=0.25,h=0.3)

plot(res1\$Fc[,1],type="l",ylim=c(0,1))
lines(res2\$Fc[,1],type="l",col=2)
lines(res3\$Fc[,1],type="l",col=3)

## End(Not run)

```

fda.usc documentation built on Oct. 17, 2022, 9:06 a.m.