Description Usage Arguments Methods Examples
Model matrix form gmmModels
. It returns the matrix of regressors
or the instruments. In restricted models, it returns the reduced matrix
of regressors.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## S4 method for signature 'linearGmm'
model.matrix(object,
type=c("regressors","instruments"))
## S4 method for signature 'rlinearGmm'
model.matrix(object,
type=c("regressors","instruments"))
## S4 method for signature 'nonlinearGmm'
model.matrix(object,
type=c("regressors","instruments"))
## S4 method for signature 'slinearGmm'
model.matrix(object,
type=c("regressors","instruments"))
## S4 method for signature 'rslinearGmm'
model.matrix(object,
type=c("regressors","instruments"))
## S4 method for signature 'snonlinearGmm'
model.matrix(object,
type=c("regressors","instruments"))
|
object |
Object of class |
type |
Should the function returns the matrix of instruments or the
matrix of regressors. For |
signature(object = "linearGmm")
Linear models with not restrictions.
signature(object = "nonlinearGmm")
Nonlinear models with not restrictions.
signature(object = "rlinearGmm")
linear models with restrictions.
signature(object = "slinearGmm")
System of linear equations with no restrictions.
signature(object = "rslinearGmm")
System of linear equations with restrictions.
signature(object = "snonlinearGmm")
System of nonlinear equations with no restrictions.
1 2 3 4 5 6 7 8 9 10 11 | data(simData)
## Unrestricted model
model1 <- gmmModel(y~x1+x2+x3, ~x2+x3+z1+z2, data=simData)
model.matrix(model1)[1:3,]
## Restrictions change the response
R <- c("x2=2","x3+x1=3")
rmodel1 <- restModel(model1, R)
rmodel1
model.matrix(rmodel1)[1:3,]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.