# ed: Fit ed model to data In hafen/ed: ed: a regression approach to density estimation

## Description

Calculate raw ed density estimates and fit ed model to data using loess

## Usage

 ```1 2 3``` ```ed(x, k = 10, disjoint = TRUE, degree = 2, span = 0.3, xgrid = 500, bounds = c(min(x), max(x)), f = NULL, family = "gaussian", normalize = FALSE, delta = 0, lower = NULL, control = loess.control()) ```

## Arguments

 `x` data, a vector `k` the gap width (in number of observations) with which to compute the raw estimates `disjoint` should non-overlapping gaps be computed? (default `TRUE`) `degree` degree of loess fitting (see `loess`) `span` span of loess fitting (see `loess`) `xgrid` number of equally-spaced points along the support of `x` at which to compute the fit `bounds` bounds at which to fit the density (see details) `f` a function providing a true density or hypothesized density, with which the ed estimate can be compared (optional) `family` loess parameter (`loess`) `normalize` should the resulting density be normalized so that it integrates to one? `delta` grid augmentation parameter (experimental). A value of 0 (default) disables grid augmentation. `lower` grid augmentation parameter (experimental) `control` loess parameter (see `loess.control`)

bounds...

## Value

a list with a lot of things (to be documented...). For now, look at str(result) to get an idea.

## Note

This function is provided as a convenience, but often you may want to simply compute the raw estimates using `ed_raw` and iteratively figure out how to fit the raw estimates with whatever nonparametric method you like.

`ed_raw`, `ed_plot`