Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: sureg and constraints


From   "Austin Nichols" <[email protected]>
To   "Stephan Brunow" <[email protected]>, [email protected]
Subject   Re: st: sureg and constraints
Date   Fri, 22 Dec 2006 10:42:27 -0500

Stephan--
If you want to write
constraint define 1 [y1]x1=[y2]x2
constraint define 2 [y2]x2=[y3]x3
for numbers 1 to n, just use -forval- or -foreach- to write a loop.

forv i=1/30 {
constraint define `i' [y`i']x`i'=[y`i']x`i'
}

Or did you have something else in mind?  You will get better advice
from the list if you supply the required information...

On 12/22/06, Stephan Brunow <[email protected]> wrote:
Dear Austin,

thank you for answering. The problem is that y1 to y_n are various equations
with different issues. I.e. this is a CES-type demand system. There might be
(for further models) some other covariates where the beta_i are not
necessarily the same.
If I run your suggestion then there is another beta-coefficient than if I do
the following:

I played a bit around in STATA constraints with only 3 equations and coded
the problem as follows

constraint define 1 [y1]x1=[y2]x2
constraint define 2 [y2]x2=[y3]x3

That works. I think, it gets out of hand for more equations.
Is there a shorter way to code that for more equations?

Many thanks,

Stephan
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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