pwmLC | R Documentation |
Compute the sample probability-weighted moments (PWMs) for left-tail censored data set—that is a data set censored from below. The censoring threshold is denoted as T
.
pwmLC(x, threshold=NULL, nmom=5, sort=TRUE)
x |
A vector of data values. |
threshold |
The left-tail censoring (lower) threshold. |
nmom |
Number of PWMs to return. |
sort |
Do the data need sorting? Note that convention is the have a |
There is some ambiguity if the threshold also numerically equals valid data in the data set. In the data for the examples below, which are taken from elsewhere, there are real observations at the censoring level. One can see how a hack is made to marginally decrease or increase the data or the threshold for the computations. This is needed because the code uses
sapply(x, function(v) { if(v >= T) return(T); return(v) } )
to reset the data vector x
. By operating on the data in this fashion one can toy with various levels of the threshold for experimental purposes; this seemed a more natural way for general implementation. The code sets n
= length(x)
and m
= n - length(x[x == T])
, which also seems natural. The \beta^A_r
are computed by dispatching to pwm
.
An R list
is returned.
Aprimebetas |
The A'-type PWMs. These should be same as |
Bprimebetas |
The B'-type PWMs. These should be |
source |
Source of the PWMs: “pwmLC”. |
threshold |
The upper censoring threshold. |
zeta |
The left censoring fraction: |
numbelowthreshold |
Number of data points equal to or above the threshold. |
observedsize |
Number of real data points in the sample (above the threshold). |
samplesize |
Number of actual sample values. |
W.H. Asquith
Zafirakou-Koulouris, A., Vogel, R.M., Craig, S.M., and Habermeier, J., 1998, L-moment diagrams for censored observations: Water Resources Research, v. 34, no. 5, pp. 1241–1249.
lmoms
, pwm2lmom
, pwm
, pwmRC
#
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.