Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ferg.df

Ferguson's Estimator


Description

Function to compute an approximation of Ferguson's estimator mu_n.

Usage

ferg.df(x, alpha, mu, npoints,...)

Arguments

x

a vector of data of length n

alpha

the degree of confidence in mu

mu

the prior guess of the unknown P (a pdf)

npoints

the number of estimated points returned

...

all of the arguments needed for mu

Value

The function returns a vector of length num.points for Ferguson's estimator.

Author(s)

Rachel Becvarik

References

See Section 16.2 of Hollander, Wolfe, Chicken - Nonparametric Statistical Methods 3.

Examples

##Hollander-Wolfe-Chicken Figure 16.2
framingham<-c(2273, 2710, 141, 4725, 5010, 6224, 4991, 458, 1587, 1435, 2565, 1863)
plot.ecdf(framingham)
lines(sort(framingham),pexp(sort(framingham), 1/2922), lty=3)
temp.x = seq(min(framingham), max(framingham), length.out=100)
lines(temp.x,ferg.df(sort(framingham), 4, npoints=100,pexp,1/2922), col=2, type="s", lty=2)
legend("bottomright",  lty=c(1,3,2), legend=c("ecdf", "prior", "ferguson"), col=c(1,1,2))

NSM3

Functions and Datasets to Accompany Hollander, Wolfe, and Chicken - Nonparametric Statistical Methods, Third Edition

v1.16
GPL-2
Authors
Grant Schneider, Eric Chicken, Rachel Becvarik
Initial release
2021-04-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.