Reg__OLSconstrained function

Restricted OLS regression

Restricted OLS regression

Reg__OLSconstrained(Y, X, Bcon, G = NULL)

Arguments

  • Y: left hand side variables (M x T)
  • X: regressors (i.e. N-1 variables + the intercept) (N x T)
  • Bcon: constraints matrix (M x N). If Bcon(i,j) = nan --> B(i,j) is a free parameter
  • G: weighting matrix (psd) - (M x M). Default is set to be identity

Returns

matrix of coefficient (M x N)

Details

Estimate of B is obtained by minimizing the objective: sum_t (Y_t-B X_t)' G^(-1) (Y_t-B*X_t) subject to the constraint that B = Bcon for all non-nan entries of Bcon

References

This function is based on the "Reg__OLSconstrained" function by Le and Singleton (2018). "A Small Package of Matlab Routines for the Estimation of Some Term Structure Models." (Euro Area Business Cycle Network Training School - Term Structure Modelling). Available at: https://cepr.org/40029

  • Maintainer: Rubens Moura
  • License: GPL-2 | GPL-3
  • Last published: 2025-03-24