Calculate Descriptive Statistics of Censored Vectors

Calculate descriptive statistics of left- and right-censored numeric vectors: the arithmetic mean, geometric mean, standard deviation, and percent coefficient of variation. Censoring is accounted for by maximum likelihood estimation with the Tobit model (Tobin (1958) ), using the convex reparameterization of the likelihood described by Olsen (1978) , rather than by ignoring or substituting censored values.


tobit.mean

R-CMD-check Codecov test coverage

The goal of tobit.mean is to calculate descriptive statistics of censored vectors (for example, concentrations below a limit of quantification). The arithmetic mean, geometric mean, standard deviation, and coefficient of variation are estimated by maximum likelihood with the Tobit model, so censored values are accounted for rather than dropped or replaced.

Installation

You can install the development version of tobit.mean from GitHub with:

# install.packages("pak")
pak::pak("humanpred/tobit.mean")

Example

Calculate the mean of a vector where values at or below 0.5 are censored:

library(tobit.mean)
tobit.mean::mean_tobit(c(0, 1, 4, 10), lower = 0.5, distribution = "t")

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("tobit.mean")

0.1.0 by Bill Denney, 11 hours ago


https://humanpred.github.io/tobit.mean/, https://github.com/humanpred/tobit.mean


Report a bug at https://github.com/humanpred/tobit.mean/issues


Browse source code at https://github.com/cran/tobit.mean


Authors: Bill Denney [aut, cre]


Documentation:   PDF Manual  


AGPL (>= 3) license


Imports stats

Suggests spelling, testthat


See at CRAN