gmm.tmvnorm {tmvtnorm} | R Documentation |
GMM Estimation for the Truncated Multivariate Normal Distribution
Description
Generalized Method of Moments (GMM) Estimation for the Truncated Multivariate Normal Distribution
Usage
gmm.tmvnorm(X,
lower = rep(-Inf, length = ncol(X)),
upper = rep(+Inf, length = ncol(X)),
start = list(mu = rep(0, ncol(X)), sigma = diag(ncol(X))),
fixed = list(),
method=c("ManjunathWilhelm","Lee"),
cholesky = FALSE,
...)
Arguments
X |
Matrix of quantiles, each row is taken to be a quantile. |
lower |
Vector of lower truncation points,
default is |
upper |
Vector of upper truncation points,
default is |
start |
Named list with elements |
fixed |
Named list. Parameter values to keep fixed during optimization. |
method |
Which set of moment conditions used, possible methods are "ManjunathWilhelm" (default) and "Lee". |
cholesky |
if TRUE, we use the Cholesky decomposition of |
... |
Further arguments to pass to |
Details
This method performs an estimation of the parameters mean
and sigma
of a truncated multinormal distribution
using the Generalized Method of Moments (GMM),
when the truncation points lower
and upper
are known.
gmm.tmvnorm()
is a wrapper for the general GMM method gmm
,
so one does not have to specify the moment conditions.
Manjunath/Wilhelm moment conditions
Because the first and second moments can be computed thanks to the mtmvnorm
function, we can set up a method-of-moments estimator by equating the sample moments
to their population counterparts. This way we have an exactly identified case.
Lee (1979,1983) moment conditions
The recursive moment conditions presented by Lee (1979,1983) are defined for l=0,1,2,\ldots
as
\sigma^{iT} E(x_i^l \textbf{x}) = \sigma^{iT} \mu E(x_i^l) + l E(x_i^{l-1}) + \frac{a_i^l F_i(a_i)}{F} - \frac{b_i^l F_i(b_i)}{F}
where E(x_i^l)
and E(x_i^l \textbf{x})
are the moments of x_i^l
and x_i^l \textbf{x}
respectively and F_i(c)/F
is the one-dimensional marginal density in variable i
as calculated by dtmvnorm.marginal
.
\sigma^{iT}
is the i
-th column of the inverse covariance matrix \Sigma^{-1}
.
This method returns an object of class gmm
, for which various
diagnostic methods are available, like profile()
, confint()
etc. See examples.
Value
An object of class gmm
Author(s)
Stefan Wilhelm wilhelm@financial.com
References
Tallis, G. M. (1961). The moment generating function of the truncated multinormal distribution. Journal of the Royal Statistical Society, Series B, 23, 223–229
Lee, L.-F. (1979). On the first and second moments of the truncated multi-normal distribution and a simple estimator. Economics Letters, 3, 165–169
Lee, L.-F. (1983). The determination of moments of the doubly truncated multivariate normal Tobit model. Economics Letters, 11, 245–250
Manjunath B G and Wilhelm, S. (2009). Moments Calculation For the Double Truncated Multivariate Normal Density. Working Paper. Available at SSRN: https://www.ssrn.com/abstract=1472153
See Also
Examples
## Not run:
set.seed(1.234)
# the actual parameters
lower <- c(-1, -2)
upper <- c(3, Inf)
mu <- c(0, 0)
sigma <- matrix(c(1, 0.8,
0.8, 2), 2, 2)
# generate random samples
X <- rtmvnorm(n=500, mu, sigma, lower, upper)
# estimate mean vector and covariance matrix sigma from random samples X
# with default start values
gmm.fit1 <- gmm.tmvnorm(X, lower=lower, upper=upper)
# diagnostic output of the estimated parameters
summary(gmm.fit1)
vcov(gmm.fit1)
# confidence intervals
confint(gmm.fit1)
# choosing a different start value
gmm.fit2 <- gmm.tmvnorm(X, lower=lower, upper=upper,
start=list(mu=c(0.1, 0.1),
sigma=matrix(c(1, 0.4, 0.4, 1.8),2,2)))
summary(gmm.fit2)
# GMM estimation with Lee (1983) moment conditions
gmm.fit3 <- gmm.tmvnorm(X, lower=lower, upper=upper, method="Lee")
summary(gmm.fit3)
confint(gmm.fit3)
# MLE estimation for comparison
mle.fit1 <- mle.tmvnorm(X, lower=lower, upper=upper)
confint(mle.fit1)
## End(Not run)