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

To compute the nonparametric kernel estimate for cumulative distribution function (CDF).

1 2 |

`x` |
the data from which the estimate is to be computed. |

`bw` |
the smoothing bandwidth to be used. |

`adjust` |
the parameter for adjusting the bandwidth. The bandwidth used for the estimate is actually |

`kernel` |
a character string giving the smoothing kernel to be used. This must be either “normal” or “epanechnikov”. By default, the normal kernel is used. |

`xgrid` |
the user-defined data points at which the CDF is to be evaluated. If missing, the CDF will be evaluated at the equally spaced points defined within the function. |

`ngrid` |
the number of equally spaced points at which the density is to be estimated. |

`from` |
the left-most points of the grid at which the density is to be estimated. |

`to` |
the right-most points of the grid at which the density is to be estimated |

`cut` |
by default, the values of from and to are cut bandwidths beyond the extremes of the data. |

`na.rm` |
logical; if |

`...` |
further arguments for methods. |

estimate the nonparametric kernel cumulative distribution function.

An object of class “CDF”.

`x` |
the points where the CDF is estimated. |

`Fhat` |
the estimated CDF values. These will be numerical numbers between zero and one. |

`bw` |
the bandwidth used. |

`n` |
the sample size after elimination of missing values. |

`call` |
the call which produced the result. |

`data` |
the original data after elimination of missing values. |

`data.name` |
the deparsed name of the |

`has.na` |
logical; if |

The `print`

method reports `summary`

values on the `x`

and `Fhat`

components.

X.F. Wang wangx6@ccf.org

Nadaraya, E.A. (1964). Some new estimators for distribution functions. *Theory of Probability and its Applications*, 9, 497-500.

Altman, N., and Leger, C. (1995). Bandwidth selection for kernel distribution function estimation. *Journal of Statistical Planning and Inference*, 46, 195-214.

1 2 3 4 5 6 7 8 | ```
## --------------------
set.seed(100)
n <- 200
x <- c(rnorm(n/2, mean=-2, sd=1), rnorm(n/2, mean=3, sd=0.8))
x.CDF <- kCDF(x)
x.CDF
plot(x.CDF, alpha=0.05, main="Kernel estimate of distribution function", CI=FALSE)
curve(pnorm(x, mean=-2, sd=1)/2 + pnorm(x, mean=3, sd=0.8)/2, from =-6, to=6, add=TRUE, lty=2, col="blue")
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.