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

coef-methodsR Documentation

~~ Methods for Function coef in Package stats ~~

Description

It extract the coefficient estimates of some moment-based models.

Methods

signature(object = "gmmfit")
signature(object = "gelfit")
signature(object = "sgmmfit")
signature(object = "momentModel")
signature(object = "rlinearModel")

It gives the unrestricted representation of a restricted model. See examples.

signature(object = "rslinearModel")

It gives the unrestricted representation of a restricted model.

signature(object = "rsnonlinearModel")

It gives the unrestricted representation of a restricted model.

signature(object = "rfunctionModel")

It gives the unrestricted representation of a restricted model. See examples.

signature(object = "rformulaModel")

It gives the unrestricted representation of a restricted model. See examples.

signature(object = "rnonlinearModel")

It gives the unrestricted representation of a restricted nonlinear model.

Examples

data(simData)
model1 <- momentModel(y~x1+x2+x3+z1, ~x1+x2+z1+z2+z3+z4, data=simData)
res1 <- gmmFit(model1)
coef(res1)

### Restricted models
rmodel1 <- restModel(model1, R=c("x1=1", "x2=2*x3"))
res2 <- gmmFit(rmodel1)
res2
coef(rmodel1, coef(res2))

momentfit documentation built on Sept. 20, 2023, 3:01 a.m.