Jeff,
Thank you for your reply and solution. I tried your code and STATA still
indicates that the options are not allowed.
. local eq1 lncom_vc lncommm lncomq lnphys lnhosp lnadm lnoth
> lnami time lncommmsq lncomqsq lnphyssq lnhospsq
> lnadmsq lnothsq lnamisq timesq tlncommm tlncomq
> tlnhosp tlnphys tlnadm tlnoth tlnami lncommmlnhosp
> lncommmlnphys lncommmlnadm lncommmlnoth lncomqlnhosp
> lncomqlnphys lncomqlnadm lncomqlnoth lncommmlncomq
> lnphyslnhosp lnphyslnoth lnphyslnadm lnhosplnadm
> lnhosplnoth lnadmlnoth lnamilnhosp lnamilnphys
> lnamilnoth lnamilnadm lnamilncommm lnamilncomq
> othexp_ind;
. local eq2 phys_shr lnhosp lnphys lnoth lnadm lncommm lncomq lnami
time;
. local eq3 hosp_shr lnphys lnhosp lnoth lnadm lncommm lncomq lnami
time;
. forvalues x = 1/5 {;
2. mysureg (`eq1', noconstant)
> (`eq2', noconstant)
> (`eq3', noconstant)
> if _j == `x',
> cluster(cocode)
> constraint(23-30);
3. };
options not allowed
r(101);
Perhaps I am running a version of mysureg that is not up to date?
Woolton
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Jeff Pitblado,
StataCorp LP
Sent: Sunday, April 08, 2007 1:38 AM
To: [email protected]
Subject: Re: st: mysureg's noconstant option
Woolton Lee <[email protected]> asks about the -noconstant- option of
-mysureg-,
a program developed in
Gould, W., J. Pitblado, and W. Sribney. 2006. Maximum Likelihood
Estimation with Stata, Third Edition. Stata Press.
(originally present in the 2nd Ed.)
> I am running the mysureg command (estimates SUR equations via ML) to
> estimate a multivariate system of three equations. For some reason, I
can't
> use the 'noconstant' option (which I think would suppress the constant
terms
> in all of the equations) even though the help command instructions
indicate
> that that is an option I may use for mysureg. Is this a bug with mysureg
or
> am I missing something? I've included my code below.
>
> forvalues x = 1/5 {;
>
> mysureg (lncom_vc lncommm lncomq lnphys lnhosp lnadm lnoth lnami
time
> lncommmsq lncomqsq lnphyssq lnhospsq lnadmsq lnothsq lnamisq
> timesq tlncommm tlncomq tlnhosp tlnphys tlnadm tlnoth tlnami
> lncommmlnhosp lncommmlnphys lncommmlnadm lncommmlnoth
> lncomqlnhosp lncomqlnphys lncomqlnadm lncomqlnoth
> lncommmlncomq
> lnphyslnhosp lnphyslnoth lnphyslnadm lnhosplnadm lnhosplnoth
> lnadmlnoth lnamilnhosp lnamilnphys lnamilnoth lnamilnadm
> lnamilncommm lnamilncomq othexp_ind)
> (phys_shr lnhosp lnphys lnoth lnadm lncommm lncomq lnami time)
> (hosp_shr lnphys lnhosp lnoth lnadm lncommm lncomq lnami time)
> if _j == `x', cluster(cocode)
> constraints(/* 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
> 17 18 19 20 21 22 */
> 23 24 25 26 27 28 29 30);
> };
Unfortunately, the help file doesn't document the -noconstant- option
correctly. -noconstant- is only allowed within the parethesis of an
equation
specification. To suppress the constant from all the equations, Woolton
will
have to specify the -noconstant- option once fore each equation.
Here is how Woolton can suppress the constant in each equation:
local eq1 lncom_vc lncommm lncomq lnphys lnhosp lnadm lnoth ///
lnami time lncommmsq lncomqsq lnphyssq lnhospsq ///
lnadmsq lnothsq lnamisq timesq tlncommm tlncomq ///
tlnhosp tlnphys tlnadm tlnoth tlnami lncommmlnhosp ///
lncommmlnphys lncommmlnadm lncommmlnoth lncomqlnhosp ///
lncomqlnphys lncomqlnadm lncomqlnoth lncommmlncomq ///
lnphyslnhosp lnphyslnoth lnphyslnadm lnhosplnadm ///
lnhosplnoth lnadmlnoth lnamilnhosp lnamilnphys ///
lnamilnoth lnamilnadm lnamilncommm lnamilncomq ///
othexp_ind
local eq2 phys_shr lnhosp lnphys lnoth lnadm lncommm lncomq lnami
time
local eq3 hosp_shr lnphys lnhosp lnoth lnadm lncommm lncomq lnami
time
forvalues x = 1/5 {
mysureg (`eq1', noconstant) ///
(`eq2', noconstant) ///
(`eq3', noconstant) ///
if _j == `x', ///
cluster(cocode) ///
constraint(23-30)
}
--Jeff
[email protected]
*
* 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/
*
* 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/