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

The function `density.reflected`

computes kernel density estimates for univariate observations using reflection in the borders.

1 2 |

`x` |
a numeric vector of data from which the estimate is to be computed. |

`lower` |
the lower limit of the interval to which x is theoretically constrained, default -Inf. |

`upper` |
the upper limit of the interval to which x is theoretically constrained, default, Inf. |

`weights` |
numeric vector of non-negative observation weights, hence of same length as x. The default NULL is equivalent to weights = rep(1/length(x), length(x)). |

`...` |
further |

`density.reflected`

is called by `dgeometric.test`

and computes the density
kernel estimate of a univariate random sample `x`

of a random variable defined in
the interval `(lower,upper)`

using the default options of `density`

and reflection in the borders.
This avoids the density kernel estimate being underestimated in the proximity of `lower`

or `upper`

.
For unbounded variables, `density.reflected`

generates the same output as `density`

with its default options.

An object of the class `density`

with borders correction, whose underlying structure
is a list containing the following components.

`x` |
the |

`y` |
the estimated density values. These will be non-negative. |

`bw` |
the bandwidth used. |

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

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

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

`has.na` |
logical, for compatibility (always |

The `print`

method reports `summary`

values on the `x`

and `y`

components.

The function is based on `density`

.

Jose M. Pavia

Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) "The New S Language." Wadsworth & Brooks/Cole (for S version).

Scott, D. W. (1992) "Multivariate Density Estimation. Theory, Practice and Visualization." New York: Wiley.

Sheather, S. J. and Jones M. C. (1991) "A reliable data-based bandwidth selection method for kernel density estimation." J. Roy. Statist. Soc. B, 683–690.

Silverman, B. W. (1986) "Density Estimation." London: Chapman and Hall.

Venables, W. N. and Ripley, B. D. (2002) "Modern Applied Statistics with S." New York: Springer.

1 2 3 4 5 6 7 8 9 10 11 |

```
Loading required package: KernSmooth
KernSmooth 2.23 loaded
Copyright M. P. Wand 1997-2009
```

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.