Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Constrained SUR

From   Erez Yoeli <>
Subject   st: Constrained SUR
Date   Thu, 7 Apr 2005 12:39:58 -0500

Hi Stata-folks,

I was wondering if you could help me with the following problem:

Let y_it be the value of my regressor in state i at time t and X_it be
my regressors.  I wish to estimate the model:

y_it = a_i + b_i X_it + e_it

subject to the constraint b_i/a_i = b_j/a_j.

That is, I'd like to run a seemingly unrelated regression system while
restricting the ratio of the slopes to be the same across all states. 
I can get the code (attached below, implemented with cnsreg not sureg
for now) to run for a simpler constraint (ie. a_i = a_j), but when I
run it with my more complex constraint I get the following error: "not
possible with test".

Thank you very much!

Graduate School of Business
University of Chicago


* Generating Costraints:
forvalues state_id = 2/51{
	local cns_num = 1000 + `state_id'
	constraint define `cns_num' aa_PR_`state_id' = (aa_PR_1 / PR_1) * PR_`state_id'

* Regressing:
cnsreg R_diff PR_* aa_PR_*, noconstant constraint(1002-1051)
*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index