From rattiya suddeephong To statalist@hsphsun2.harvard.edu Subject st: Ask for STATA Date Thu, 11 Dec 2008 01:59:04 -0800 (PST)

```Dear statalist

I am currently doint analyze of linear almost ideal demand system. I define constraint and then run model by "sureg" command. It didn't work the results show "convariance metrix of error is singular". Could you please give me the idea how I can solve this problem.

Moreover, I would apply Shonkwiler and Yen approach to drawback zero consumption. I already did the probit model and then calculte cdf and pdf from the probit model. What is the stata command to applye these value in the demand system model.

I have five commodity groups which indicate by budget share in each group : w_x (x denotes commodity namely f, v, rg, m, fs) and I have price information for each group which indicate by px. and other household characteristics.

*define constraint for symetry restriction

constraint define 1 [w_f]pv = [w_v]pf
constraint define 2 [w_f]prg = [w_rg]pf
constraint define 3 [w_f]pm = [w_m]pf
constraint define 4 [w_f]pfs = [w_fs]pf
constraint define 5 [w_v]prg = [w_rg]pv
constraint define 6 [w_v]pm = [w_m]pv
constraint define 7 [w_v]pfs = [w_fs]pv
constraint define 8 [w_rg]pm = [w_m]prg
constraint define 9 [w_rg]pfs = [w_fs]prg
constraint define 10 [w_m]pfs = [w_fs]pm

*define constraint for homogeneity restriction

constraint define 11 [w_f]pf+[w_f]pv+[w_f]prg+[w_f]pm+[w_f]pfs = 0
constraint define 12 [w_v]pf+[w_v]pv+[w_v]prg+[w_v]pm+[w_v]pfs = 0
constraint define 13 [w_rg]pf+[w_rg]pv+[w_rg]prg+[w_rg]pm+[w_rg]pfs = 0
constraint define 14 [w_m]pf+[w_m]pv+[w_m]prg+[w_m]pm+[w_m]pfs = 0
constraint define 15 [w_fs]pf+[w_fs]pv+[w_fs]prg+[w_fs]pm+[w_fs]pfs = 0
*Group independent variables in one group

global indep "lnx ln_pf ln_pv ln_prg ln_pm ln_pfs pf pv prg pm pfs edu_y ld size fp awn bkk"

sureg (w_f \$indep)(w_v \$indep)(w_rg \$indep)(w_m \$indep)(w_fs \$indep), constraints(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)

Kindly Best Regards,

Rattiya

Rattiya Suddeephong  Agricultural Economics (Faculty of Economics)  Kasetsart University, Bangkok Thailand  Tel: 661-891080466

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```