truncate_moment_vector_until_valid: This function truncates m_hat until it belongs to the moment...

View source: R/truncate_moment_vector_until_valid.R

truncate_moment_vector_until_validR Documentation

This function truncates m_hat until it belongs to the moment space. The truncated moment is put in m_trun. Sigma is an estimator of the "variance" of m_hat, or more accurately, of the asymptotic variance of m_hat, properly normalized.

Description

This function truncates m_hat until it belongs to the moment space. The truncated moment is put in m_trun. Sigma is an estimator of the "variance" of m_hat, or more accurately, of the asymptotic variance of m_hat, properly normalized.

Usage

truncate_moment_vector_until_valid(
  m,
  asymptotic_variance_matrix_m = NULL,
  thresholdDeterminant = 0
)

Arguments

m

is the estimated vector of moments. NAs at the end are ignored.

asymptotic_variance_matrix_m

(default NULL) is the estimated variance matrix for the vector of moments m. If NULL, the moment vector is assumed to be known with perfect accuracy (no noise).

thresholdDeterminant

(default 0). The threshold used to decide whether the determinant of the Hankel matrices is null. If the estimated determinant is less than that threshold, it is considered null (so the moment vector is on the boundary). Setting the threshold as a small positive value is meant to account for the noise on the moment vector, e.g. to ensure moment vectors on the boundary are rejected exactly 95

@return A list containing: - truncatedMomentVector: m_1, ..., m_k for the largest k such that m_1, ..., m_k is a valid vector of moments that is not on the boundary, i.e. the determinants of the upper and lower hankel matrices for all initial subvectors are positive. - infringedConstraint, a scalar taking value 0 if the input vector of moments was valid, 1 if the first invalid moment was too large and -1 if the first invalid moment was too small.


cgaillac/MarginalFElogit documentation built on Dec. 24, 2024, 3:23 p.m.