Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

R Programming/Method of Moments

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

Generalized method of moments Method of moments (statistics) Package gmm implements the generalized method of moment and the generalized empirical likelihood. First, it is possible to estimate a simple linear model or a simple linear model with instrumental variables using the gmm() function. The GMM method is often used to estimate heteroskedastic instrumental variable models. > # Simple linear model > N <- 1000 > u <- rnorm(N) > x <- 1 + rnorm(N) > y <- 1 + x + u > res <- gmm(y ~ x, x) > # Simple linear model with instrumental variables. > library(gmm) > N <- 1000 > u <- rnorm(N) > z <- rnorm(N) > x <- 1 + z + u + rnorm(N) > y <- 1 + x + u > res <- gmm(y ~ x, z) > summary(res)