Estimation of group-level means and standard deviations from binned (coarsened) count data. The package implements three methods with a common output structure:
bin_means() — fast per-group estimator under
within-group normality. Linear in the number of groups times the number
of bins.mle_hetop() — maximum-likelihood fit of the
heteroskedastic ordered probit (HETOP) model.fh_hetop() — Bayesian variant of HETOP via MCMC.This package was previously called HETOP and was maintained by J. R. Lockwood; it is renamed and extended to reflect the broader set of estimators now included.
# install.packages("remotes")
remotes::install_github("paulvonhippel/binest")(Or install.packages("binest") once on CRAN.)
library(binest)
data(tx_g6_math_2018)
ngk <- with(tx_g6_math_2018,
cbind(unsatisfactory, approaches, meets, masters))
cuts <- c(1536, 1653, 1772)
fit <- bin_means(ngk, cutpoints = cuts)
cor(fit$est_raw$group_mean_mle, tx_g6_math_2018$reported_mean)See vignette("binest") for a full comparison of the
three estimators on the Texas STAAR Grade-6 mathematics data.
GPL (>= 2).