--- title: "Package overview and workflow map" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{Package overview and workflow map} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r, include = FALSE} knitr::opts_chunk$set(collapse = TRUE, comment = "#>") set.seed(2026) ``` This vignette gives a compact map of the package. For a first executable example, start with the "Getting started with GLBFP" vignette. ## Estimator families `GLBFP` implements three related histogram-based density estimator families. | Family | Pointwise function | Grid function | Main tuning inputs | |---|---|---|---| | Averaged Shifted Histogram | `ASH()` | `ASH_estimate()` | `b`, `m` | | Linear Blend Frequency Polygon | `LBFP()` | `LBFP_estimate()` | `b` | | General Linear Blend Frequency Polygon | `GLBFP()` | `GLBFP_estimate()` | `b`, `m` | Lowercase aliases are also available: ```{r} library(GLBFP) c( ash = exists("ash"), lbfp = exists("lbfp"), glbfp = exists("glbfp") ) ``` The uppercase names are kept for compatibility with the original package API. ## Core workflow Most analyses follow the same sequence: 1. prepare a finite numeric matrix or data frame; 2. choose a bandwidth vector `b`; 3. choose `m` when using `ASH` or `GLBFP`; 4. evaluate a pointwise estimator or a grid estimator; 5. inspect the S3 summary, plot, and optional diagnostics. ```{r} x <- matrix(rnorm(300), ncol = 1) b <- compute_bi_optim(x, m = 1) point_fit <- glbfp(x = 0, data = x, b = b, m = 1) grid_fit <- glbfp_estimate(data = x, b = b, m = 1, grid_size = 80) summary(point_fit) summary(grid_fit) ``` ## Article guide Use the vignettes in this order when learning the package: | Article | Purpose | |---|---| | Getting started with GLBFP | First runnable examples and basic object usage | | Package overview and workflow map | Orientation across estimators and workflows | | Brief methodological background | Minimal statistical context and references | | Choosing between ASH, LBFP and GLBFP | Practical estimator comparison | | Two-dimensional density estimation | 2D estimation and visualization | | Sparse-prefix computation | Internal sparse grid-count diagnostics | | Leave-one-out `D_i` diagnostics | Fixed-grid leave-one-out diagnostics | | Objects, summaries and plotting | S3 classes and helper methods | | Validation and comparison | Lightweight benchmark scaffolding | ## Input expectations The package expects finite numeric observations with one observation per row. Missing values should be removed or handled before estimation. For nearly constant data, provide explicit non-degenerate `min_vals` and `max_vals`.