censStats | R Documentation |
Computes the mean and standard deviation of censored data.
censStats(x, method = "MLE", na.rm = FALSE, alpha = 0.4) ## Default S3 method: censStats(x, method = "MLE", na.rm = FALSE, alpha = 0.4) ## S3 method for class 'lcens' censStats(x, method = "MLE", na.rm = FALSE, alpha = 0.4) ## S3 method for class 'mcens' censStats(x, method = "MLE", na.rm = FALSE, alpha = 0.4) ## S3 method for class 'qw' censStats(x, method = "log MLE", na.rm = FALSE, alpha = 0.4)
x |
an object of a censored-data class whose sample mean and standard deviation are needed. |
method |
the method to use for computing the statistics. See Details. |
na.rm |
logical; if |
alpha |
the offset fraction to be used, depending on |
The methods available in the current version are "log MLE," "MLE," "log ROS,"
"ROS," "log AMLE," "AMLE," and "flipped K-M." The method "flipped K-M"
produces statistics using the Kaplan-Meier method on flipped data described
by Helsel (2012). The methods "log ROS," "log MLE," and "log AMLE" are
described by Helsel (2012) and Helsel and Cohn (1988). The methods "ROS,"
"MLE," and "AMLE" are similar to the previous except that no log- and
back-transforms are made on the data. For "log" methods, if any value in
x
is negative, then a warning is generated and the returned list
contains missing values.
A list with one component for mean and sd. If "log" methods are
specified, then the meanlog amd meansd components are also included. The
values returned for method
="flipped K-M" can be of class "mcens."
Helsel, D.R. 2012, Statistics for censored environmental data using Minitab and R: New York, Wiley, 324 p.
Helsel, D.R. and Cohn, T.A., 1988, Estimation of descriptive statistics for multiply censored water quality data: Water Resources Research v. 24, n. 12, pp.1997–2004
mdlAMLE
, mdlKM
, mdlKMstats
,
mdlMLE
, mdlROS
set.seed(936) Y <- rlnorm(32) # Uncensored statistics censStats(Y, method="log MLE") # Censored statistics, at 1 (37.5 percent) censStats(as.lcens(Y, 1), method="log MLE")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.