fillIn | R Documentation |
Estimates values for censored data.
fillIn(x, method, alpha) ## S3 method for class 'numeric' fillIn(x, method, alpha) ## S3 method for class 'lcens' fillIn(x, method = "ROS", alpha = 0.4) ## S3 method for class 'mcens' fillIn(x, method = "ROS", alpha = 0.4)
x |
an object of class "lcens." Missing values are ignored. |
method |
the method to use for estimating censored values:
"ROS," "log ROS," "MLE," or "log MLE" are valid for any left-
or multiply-censored data ; "triangular," "fill" and "log fill" are valid for
left-censored data with a single detection limit; |
alpha |
the offset fraction to be used for plotting position; typically in [0,0.5]. |
The methods of Regression on Order Statistics (ROS) and MLE is explained in Helsel (2012). The "log ROS" first log-transforms the data and back-transforms the estimated values. The triangular method distributes the censored value assuming a triangular distribution between 0 and the single detection limit. Quinn and Keogh (2003) describe alternatives to simple substituion of a single value that sample from an alternate distribution. The triangular distribution is a reasonable distribution when the percentage of censored data is relatively small, say less than 30 percent. The "fill" and "log fill" methods implement the method described by Gleit (1985).
A vector of sorted estimates and actual values with an attribute of the censoring levels.
Helsel, D.R. 2012, Statistics for censored environmental data
using Minitab and R: New York, Wiley, 324 p.
Quinn, G.P. and Keogh, M.J., 2003, Experimental design and data analysis for
biologists, Cambridge University Press, Cambridge, UK, 539 p.
as.double.qw
set.seed(5420) XR <- sort(rnorm(10)) XF <- fillIn(as.lcens(XR, -1)) # censors lowest 3 values #How'd we do? rbind(XR, XF) #Note that this is unusual because all 10 random values were less than the mean!
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.