Skip to content

gmm

Generalized Method of Moments and Generalized Empirical Likelihood

v1.9-1 · Aug 26, 2025 · GPL (>= 2)

Description

It is a complete suite to estimate models based on moment conditions. It includes the two step Generalized method of moments (Hansen 1982; <doi:10.2307/1912775>), the iterated GMM and continuous updated estimator (Hansen, Eaton and Yaron 1996; <doi:10.2307/1392442>) and several methods that belong to the Generalized Empirical Likelihood family of estimators (Smith 1997; <doi:10.1111/j.0013-0133.1997.174.x>, Kitamura 1997; <doi:10.1214/aos/1069362388>, Newey and Smith 2004; <doi:10.1111/j.1468-0262.2004.00482.x>, and Anatolyev 2005 <doi:10.1111/j.1468-0262.2005.00601.x>).

Downloads

CRAN

14.1K

Last 30 days

980th

47.3K

Last 90 days

213.2K

Last year

Trend: -22.4% (30d vs prior 30d)

r2u CRAN

181

Last 30 days

420

Last 90 days

1.2K

Last year

Trend: +63.1% (30d vs prior 30d)

autoCRAN

1

Last 7 days

13

Last 30 days

1

All-time

autoCRAN-only: this name is served only by autoCRAN, so the count is exact.

conda-forge CRAN

502

Last 30 days

1.6K

Last 90 days

8.6K

Last year

Trend: -15.5% (30d vs prior 30d)

CRAN Check Status

13 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Jun 9, 2026
ERROR 12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Jun 8, 2026
ERROR r-devel-linux-x86_64-debian-gcc

examples

Running examples in ‘gmm-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: gmm
> ### Title: Generalized method of moment estimation
> ### Aliases: gmm gmmWithConst evalGmm
> 
> ### 
...[truncated]...
212145872e-28  *******             

> 
> ## linear tests can be performed using linearHypothesis from the car package
> ## The CAPM can be tested as follows:
> 
> library(car)
Error in library(car) : there is no package called ‘car’
Execution halted
OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 27, 2026
ERROR 13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Mar 24, 2026
ERROR r-devel-linux-x86_64-debian-gcc

examples

Running examples in ‘gmm-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: confint
> ### Title: Confidence intervals for GMM or GEL
> ### Aliases: confint.gel confint.ategel confint
...[truncated]...
n-conformable arguments
Error in AllArg$bw(obj, order.by = AllArg$order.by, kernel = AllArg$kernel,  : 
  VAR(1) prewhitening of estimating functions failed
Calls: gel ... FinRes.baseGmm.res -> .weightFct -> .myKernHAC -> <Anonymous>
Execution halted
OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026

Code

Structure

Lines of code

9,639

Files

67

Compiled share

1.8%

Has compiled src

Yes

Language breakdown

R 5,145 (53.4%)C/C++/src 178 (1.8%)Docs 2,658 (27.6%)Vignettes 1,658 (17.2%)

API

Exported functions

86

Internal functions

40

Testing & CI

Has tests

No

Test-to-code ratio

0.00

testthat edition

CI present

No

CI type

[]

PR gated

No

Docs

Return-value doc rate

92.9%

\dontrun example ratio

0%

Roxygen coverage

100%

Has pkgdown

No

NEWS present

Yes

Health & Security signals

Informational signals; not verdicts.

on.exit coverage

Unsafe pattern score

0

Dep constraint coverage

0%

Secret pattern count

0

Bundled 3rd-party code

2 items

Portability & License

Min R version

2.10.0

System requirements

C++ standard

License

GPL (>= 2)

License flags

SPDX valid, OSI approved

History

Versions

33

First release

2008-10-16

Latest release

2025-08-26

Avg cadence

78 days

Cold removal rate

100%

Dep drift

9

LOC over versions

v0.1-0: 536 LOCv1.0-0: 1,927 LOCv1.0-1: 1,985 LOCv1.0-2: 1,978 LOCv1.0-3: 1,978 LOCv1.0-4: 2,035 LOCv1.0-6: 2,038 LOCv1.0-7: 2,055 LOCv1.1-0: 3,193 LOCv1.1-1: 3,193 LOCv1.3-0: 3,583 LOCv1.3-2: 3,607 LOCv1.3-3: 3,607 LOCv1.3-5: 3,733 LOCv1.3-6: 3,745 LOCv1.3-8: 4,007 LOCv1.4-0: 4,592 LOCv1.4-1: 4,594 LOCv1.4-2: 4,613 LOCv1.4-3: 4,711 LOCv1.4-4: 4,714 LOCv1.4-5: 4,714 LOCv1.5-0: 6,470 LOCv1.5-1: 6,509 LOCv1.5-2: 6,523 LOCv1.6-1: 8,956 LOCv1.6-2: 9,155 LOCv1.6-4: 9,559 LOCv1.6-5: 9,559 LOCv1.6-6: 9,575 LOCv1.7: 9,575 LOCv1.8: 9,575 LOCv1.9-1: 9,639 LOC

Per-file churn detail lives in the source pipeline: https://github.com/r-observatory/cran-code-metrics.

Reverse Dependencies (9)

depends

suggests

Dependency Network

Dependencies Reverse dependencies sandwich tmvtnorm OneSampleMR PointFore estprod extremeIndex naivereg sfadv broom mev gmm

Version History

34 tracked
new 1.9-1 Mar 10, 2026
updated 1.9-1 ← 1.8 diff Aug 25, 2025
updated 1.8 ← 1.7 diff Jun 5, 2023
updated 1.7 ← 1.6-6 diff Aug 11, 2022
updated 1.6-6 ← 1.6-5 diff Mar 4, 2021
updated 1.6-5 ← 1.6-4 diff May 27, 2020
updated 1.6-4 ← 1.6-2 diff Dec 3, 2019
updated 1.6-2 ← 1.6-1 diff Mar 14, 2018
updated 1.6-1 ← 1.5-2 diff Jun 14, 2017
updated 1.5-2 ← 1.5-1 diff Mar 16, 2015
updated 1.5-1 ← 1.5-0 diff Feb 8, 2015
updated 1.5-0 ← 1.4-5 diff Dec 10, 2013
updated 1.4-5 ← 1.4-4 diff Jan 10, 2013
updated 1.4-4 ← 1.4-3 diff Nov 21, 2012
updated 1.4-3 ← 1.4-2 diff Sep 22, 2012