Statalist The Stata Listserver


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

st: Re: system for adding-up constraint


From   Kit Baum <[email protected]>
To   [email protected]
Subject   st: Re: system for adding-up constraint
Date   Fri, 2 Jun 2006 16:26:40 -0400

No need for ml, sureg, dirilichet, etc. Just plain old OLS will produce this result when you have a complete set of share variables as the dependent variables and a common set of regressors. A number of econometrics textbooks treat this case. Think about it: if you have, say, three dep.vars. which always add up to one in the data, write down those three equations and add them up. The estimated coeffs. on each of the X variables MUST sum to zero, since a change in X must cause reallocation among the y variables (unless, e.g., the dep vars. are portfolio shares, and one of the regressors is total wealth; then the coeffs, must sum to one). So must the sum of the three regression residuals FOR EVERY OBS., which implies that the rank of the residual matrix must not be full.

Here's a numerical illustration:

clear
set obs 100
g double p1=0.4*uniform()
g double p2=0.3*uniform()
g double p3=1-p1-p2
g x1=uniform()
g x2=log(uniform())
g x3=x1^2
qui reg p1 x1 x2 x3
predict double p1h
qui reg p2 x1 x2 x3
predict double p2h
qui reg p3 x1 x2 x3
predict double p3h
g double phats = p1h+p2h+p3h
su

Notice that the phats series is a vector of ones.


Kit Baum, Boston College Economics
http://ideas.repec.org/e/pba1.html


On Jun 2, 2006, at 2:33 AM, Giovanni wrote:



i am asking your advice on how to estimate a system of equations in the
presence of an adding-up contraint.
My problem is perhaps similar to that tackled by Poi (2002), SJ, 2(4):
403-410, but I'm not sure how far I can stretch the comparison,
and would like to avoid shooting at a fly using a cannon.

Here are the details of my problem.

The dependent variables are relative frequencies: pi_1, pi_2, ..., pi_7,
which sum up to one.

I need to estimate the *same* model for each pi_i (i = 1,...7). The model is
linear and simple enough:

pi_i = alpha_i + beta1_i * X1 + ... + betak_i * Xk (i=1,...,7)

The difficulty is that I want to obtain predicted values that add up to one.
*
*   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