Learn R Programming

momentfit (version 0.5)

modelResponse-methods: ~~ Methods for Function modelResponse in Package momentfit ~~

Description

Return the response vector in models with and without restrictions

Arguments

Methods

signature(object = "linearModel")

For linear models without restrictions on the coefficients.

signature(object = "slinearModel")

For system of linear models without restrictions on the coefficients.

signature(object = "rslinearModel")

For system of linear models with restrictions on the coefficients.

signature(object = "rlinearModel")

For linear models with restrictions on the coefficients.

Examples

Run this code
data(simData)

## Unrestricted model
model1 <- momentModel(y~x1+x2+x3, ~x2+x3+z1+z2, data=simData)
y <- modelResponse(model1)

## Restrictions change the response
R <- c("x2=2","x3=3")
rmodel1 <- restModel(model1, R)
rmodel1
restY <- modelResponse(rmodel1)

Run the code above in your browser using DataLab