# confint: Confidence intervals for GMM or GEL In gmm: Generalized Method of Moments and Generalized Empirical Likelihood

## Description

It produces confidence intervals for the coefficients from `gel` or `gmm` estimation.

## Usage

 ``` 1 2 3 4 5 6 7 8 9 10 11 12``` ```## S3 method for class 'gel' confint(object, parm, level = 0.95, lambda = FALSE, type = c("Wald", "invLR", "invLM", "invJ"), fact = 3, corr = NULL, ...) ## S3 method for class 'gmm' confint(object, parm, level = 0.95, ...) ## S3 method for class 'ategel' confint(object, parm, level = 0.95, lambda = FALSE, type = c("Wald", "invLR", "invLM", "invJ"), fact = 3, corr = NULL, robToMiss=TRUE, ...) ## S3 method for class 'confint' print(x, digits = 5, ...) ```

## Arguments

 `object` An object of class `gel` or `gmm` returned by the function `gel` or `gmm` `parm` A specification of which parameters are to be given confidence intervals, either a vector of numbers or a vector of names. If missing, all parameters are considered. `level` The confidence level `lambda` If set to TRUE, the confidence intervals for the Lagrange multipliers are produced. `type` 'Wald' is the usual symetric confidence interval. The thee others are based on the inversion of the LR, LM, and J tests. `fact` This parameter control the span of search for the inversion of the test. By default we search within plus or minus 3 times the standard error of the coefficient estimate. `corr` This numeric scalar is meant to apply a correction to the critical value, such as a Bartlett correction. This value depends on the model (See Owen; 2001) `x` An object of class `confint` produced by `confint.gel` and `confint.gmm` `digits` The number of digits to be printed `robToMiss` If `TRUE`, the confidence interval is based on the standard errors that are robust to misspecification `...` Other arguments when `confint` is applied to another classe object

## Value

It returns a matrix with the first column being the lower bound and the second the upper bound.

## References

Hansen, L.P. (1982), Large Sample Properties of Generalized Method of Moments Estimators. Econometrica, 50, 1029-1054, Hansen, L.P. and Heaton, J. and Yaron, A.(1996), Finit-Sample Properties of Some Alternative GMM Estimators. Journal of Business and Economic Statistics, 14 262-280. Owen, A.B. (2001), Empirical Likelihood. Monographs on Statistics and Applied Probability 92, Chapman and Hall/CRC

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49``` ```################# n = 500 phi<-c(.2,.7) thet <- 0 sd <- .2 x <- matrix(arima.sim(n = n, list(order = c(2,0,1), ar = phi, ma = thet, sd = sd)), ncol = 1) y <- x[7:n] ym1 <- x[6:(n-1)] ym2 <- x[5:(n-2)] H <- cbind(x[4:(n-3)], x[3:(n-4)], x[2:(n-5)], x[1:(n-6)]) g <- y ~ ym1 + ym2 x <- H t0 <- c(0,.5,.5) resGel <- gel(g, x, t0) confint(resGel) confint(resGel, level = 0.90) confint(resGel, lambda = TRUE) ######################## resGmm <- gmm(g, x) confint(resGmm) confint(resGmm, level = 0.90) ## Confidence interval with inversion of the LR, LM or J test. ############################################################## set.seed(112233) x <- rt(40, 3) y <- x+rt(40,3) # Simple interval on the mean res <- gel(x~1, ~1, method="Brent", lower=-4, upper=4) confint(res, type = "invLR") confint(res) # Using a Bartlett correction k <- mean((x-mean(x))^4)/sd(x)^4 s <- mean((x-mean(x))^3)/sd(x)^3 a <- k/2-s^2/3 corr <- 1+a/40 confint(res, type = "invLR", corr=corr) # Interval on the slope res <- gel(y~x, ~x) confint(res, "x", type="invLR") confint(res, "x") ```

### Example output

```Loading required package: sandwich

Direct Wald type confidence interval
#######################################
0.025      0.975
(Intercept)  -0.112919   0.063337
ym1           0.075789   0.314697
ym2           0.612944   0.855240

Direct Wald type confidence interval
#######################################
0.05       0.95
(Intercept)  -0.098751   0.049169
ym1           0.094994   0.295492
ym2           0.632422   0.835763

Direct Wald type confidence interval
#######################################
0.025        0.975
Lam((Intercept))  -1.3655e-04   8.8369e-05
Lam(h1)           -7.3975e-02   4.8271e-02
Lam(h2)           -4.5473e-02   7.1779e-02
Lam(h3)           -6.5570e-02   1.0886e-01
Lam(h4)           -1.0111e-01   5.6439e-02

Wald type confidence interval
#######################################
0.025      0.975
(Intercept)  -0.116823   0.066259
ym1           0.070000   0.311373
ym2           0.617995   0.856880

Wald type confidence interval
#######################################
0.05       0.95
(Intercept)  -0.102105   0.051542
ym1           0.089403   0.291970
ym2           0.637199   0.837677

Confidence interval based on the inversion of the LR test
#######################################
0.025     0.975
(Intercept)  -0.56988   0.45121

Direct Wald type confidence interval
#######################################
0.025     0.975
(Intercept)  -0.57897   0.40231

Confidence interval based on the inversion of the LR test
#######################################
0.025    0.975
(Intercept)  -0.5807   0.4649

Confidence interval based on the inversion of the LR test
#######################################
0.025    0.975
x  0.84435  1.32845

Direct Wald type confidence interval
#######################################
0.025   0.975
0.7949  1.2690
```

gmm documentation built on June 20, 2017, 3:01 p.m.