restricted_OLS_c {RRI}R Documentation

Fast least squares with linear constraint

Description

This functions fits the regression y ~ X under a linear constraint on the model parameters. The constraint is Q * beta = c where beta are the regression model parameters, and Q, c are inputs.

Usage

restricted_OLS_c(y, X, bhat, Q, c)

Arguments

y

Vector of outcomes.

X

Matrix of covariates (first column should be 1's)

bhat

Unconstrained OLS-fitted coefficients.

Q

Matrix of linear constraints (k x p).

c

Vector of constraint values (k x 1).

Value

Vector of fitted OLS coefficients under linear constraint.

See Also

Advanced Econometrics (Section 1.4, Takeshi Amemiya, 1985)


[Package RRI version 1.1 Index]