Dear Maarten,
thanks a lot for your message.
I'll experiment with your program... after studying the Dirichlet
distribution, about which I am fully ignorant.
Your help has been really appreciated.
Giovanni
----------------------------------------------------------
Giovanni VECCHI
Dipartimento di Economia e Istituzioni
Universit� di Roma "Tor Vergata"
Via Columbia, 2
00133 Roma
Italy
voice + 39 06 7259 5730
fax + 39 06 2020 500
email [email protected]
webpage http://www.economia.uniroma2.it/vecchi.htm
----------------------------------------------------------
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Maarten Buis
Sent: Thursday, June 01, 2006 2:31 PM
To: [email protected]
Subject: st: RE: sureg? ml? system with adding-up constraint
---Giovanni Vecchi wrote:
> 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.
Giovanni:
This looks like the kind of problem for which -dirifit- was made.
Unfortunately the version on ssc contains a bug and ssc will not be updated
till june 9th (presumably Kit is enjoying a well deserved vacation), so I
have put a corrected version on my website. To get it,
type: - net from http://home.fsw.vu.nl/m.buis/stata - and than - -.
-dirifit- doesn't have a predict command, but it is quite easy to get the
predicted proportions you want, see the example.
*-------------------- begin example -------------------------- use
http://home.fsw.vu.nl/m.buis/stata/municipality.dta, clear dirifit safety
social infrastructure, muvar(density poverty)
tempvar xb2 xb3
gen `xb2' = [mu2]_cons + [mu2]density*density + [mu2]poverty*poverty gen
`xb3' = [mu3]_cons + [mu3]density*density + [mu3]poverty*poverty
gen p1 = 1/(1 + exp(`xb2') + exp(`xb3')) gen p2 = exp(`xb2')/(1 + exp(`xb2')
+ exp(`xb3')) gen p3 = exp(`xb3')/(1 + exp(`xb2') + exp(`xb3'))
*-------------------- end example ---------------------------
-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands
visiting adress:
Buitenveldertselaan 3 (Metropolitan), room Z214
+31 20 5986715
http://home.fsw.vu.nl/m.buis/
-----------------------------------------
*
* 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/
__________ Informazione NOD32 1.1572 (20060601) __________
Questo messaggio � stato controllato dal Sistema Antivirus NOD32
http://www.nod32.it
*
* 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/