ed_raw: Calculate ed Raw Estimates

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

View source: R/ed_raw.R

Description

Calculate ed raw estimates

Usage

1
ed_raw(x, k = 10, disjoint = TRUE, f = NULL)

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)

f

a function providing a true density or hypothesized density, with which the ed estimate can be compared (optional)

Value

a data frame with: x, the location at which the raw estimate was calculated; raw the raw log density estimate

Note

It is advised to stick with disjoint=TRUE since this will ensure that the errors of subsequent fitting of the raw estimates will be independent.

Author(s)

Ryan Hafen

See Also

ed, ed_plot

Examples

1
2
3
4
5
6
x <- rnorm(1000)
x_raw <- ed_raw(x)
plot(x_raw)
# overlay actual log density
ss <- seq(-4, 4, length = 200)
lines(ss, log(dnorm(ss)))

hafen/ed documentation built on May 17, 2019, 1:32 p.m.