update-methods: ~~ Methods for Function 'update' in Package 'stats' ~~

Description Usage Arguments Methods Examples

Description

The method is used to refit the model by GMM with either a different method or with modifications to the gmmModels

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## S4 method for signature 'gmmfit'
update(object, ..., evaluate=TRUE)

## S4 method for signature 'gelModels'
update(object, ...)

## S4 method for signature 'gmmModels'
update(object, ...)

## S4 method for signature 'gelfit'
update(object, newModel=NULL, ...,
evaluate=TRUE)

Arguments

object

An object produced by "modelFit" or a model class

...

Arguments to modify the model or the GMM method

newModel

When provided, the new model is estimated using the same specification. For example, it is particularly useful to estimate the restricted model using the same optim specification as the unrestricted model.

evaluate

The modified call argument is only evaluated when evaluate is TRUE

Methods

signature(object = "ANY")
signature(object = "gmmfit")

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
x <- rchisq(200,5)
z1 <- rnorm(200)
z2 <- .2*x+rnorm(200)
y <- x+rnorm(200)
dat <- data.frame(y=y,z1=z1,x=x,z2=z2)
theta <- c(beta0=1,beta1=2)
model1 <- gmmModel(y~x, ~z1+z2, data=dat)

(res <- modelFit(model1))

## lets change to iterative
update(res, type="iter")

## Let change the HAC specification in the model1 object
## to MDS
update(res, vcov="MDS")

gmm4 documentation built on Dec. 6, 2019, 3:01 a.m.