Learn R Programming

MGBT (version 1.0.4)

CondMomsZ: Conditional Moments: N.B. Moments employ only observations above Xsi

Description

Compute the \(Z\)-conditional moments (standard normal distributed moments) based on only those (\(n\) \(-\) \(r\)) observations above a threshold \(X_{si}\) for a sample size of \(n\) and \(r\) number of truncated observations. The first moment is gtmoms(xsi,1), which is in the first returned column. The second moment is

  (gtmoms(xsi,2) - gtmoms(xsi,1)^2)/(n-r)

that is in the second returned column. Further mathematical details are available under gtmoms.

Usage

CondMomsZ(n, r, xsi)

Arguments

n

The number of observations;

r

The number of truncated observations; and

xsi

The lower threshold (see gtmoms).

Value

The value a two-column, one-row R matrix.

References

Cohn, T.A., 2013--2016, Personal communication of original R source code: U.S. Geological Survey, Reston, Va.

See Also

CondMomsChi2, gtmoms

Examples

Run this code
# NOT RUN {
CondMomsZ(58, 2, -3.561143)
#             [,1]       [,2]
#[1,] 0.0007033727 0.01781241
# }

Run the code above in your browser using DataLab