Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
Ana <[email protected]> |

To |
[email protected] |

Subject |
Re: st: Symmetry Test |

Date |
Thu, 12 May 2011 12:18:39 -0300 |

Dear Alex (and Statalisters), I will try to make myself clear know. My plan is to estimate a Seven Demand Equations using Quiads Model (based on nlsurquaids.ado routine by Brian Poi (2008)) My main goal is to test one hypothesis based on Browning & Chiappori model (reference: Efficient Intra-Household Allocations: A general Characterization and Empirical Tests, Econometrica, vol.66, no.6 (Nov.,1998), pp 1241-1278). Based on the nslurquaids.ado routine (Brian Poi (2008)), without the symmetry restriction and based on the originally demand for four goods (and three share equations) generated by the author, I am trying to implement this Browning and Chiappori test. If I am well suceeded, I will extend this routine to "my" model (with more goods...). Based on the following routine of the nlsurquaids.ado, nlsur quaids @ w1 w2 w3 lnp1-lnp4 lnm, ifgnls nequations(3) param(a1 a2 a3 b1 b2 b3 g11 g12 g13 g21 g22 g23 g31 g32 g33 l1 l2 l3) nolog the test I would like to carry out is something like: (g31 - g13) = (g12 - g21)*(g23 - g32) & (g21 - g12) = (g31 - g13)*(g23 - g32) The problem is that when I execute the command: testnl (([eq1]_b[/g31] - [eq1]_b[/g13]) = ...*[eq2]_b[/g23] - [eq3]_b[/g32])) (([eq2]_b[/g21] - [eq1]_b[/g12]) = ...*[eq2]_b[/g23] - [eq3]_b[/g32])) Stata ansewrs that [eq1] was not found. My guess is that I'm making a syntax error or that I am "forgetting" to include a program or a command to name equations, parameters inside the nlsurquaids.ado. Anyway, I'd appreciate if you can help me. Thank you very much in advance. Very best regards, Ana. 2011/5/11 Alex Olssen <[email protected]>: > Dear Ana, > > I don't really understand what you are asking. > > "Based on your routine below, how could I distinguish the parameters fo > interst for the symmetry test (g12 g21 g31 g13...) from the other > parameters of the model?" > > What do you mean by "distinguish"? > > "Still, sometimes (for other exercises I'm planning to do), I'd like to > keep only some parameters from the model and make some test." > > Are you asking about implementing exclusion (zero) restrictions on > some parameters? > You should be able to do this by removing the parameters you want to > exclude from the > > scalar `name' = `at'[1,x] > > list, and delete the parameter and its associated variable from the > > replace w`i' = ... > > list. > > How can I "view "and "use" the some parameters from the model? > In the case of ther symmetry test (if I only use the unrestricted > model), I tried to use something like [eq_1]g12 = [eq_2]g2, but stata > (actually, me!) always complain with something about: "equation [1] > not found". > > I don't understand what you are asking? Do you want to test the > single symmetry constraint g12 = g21 on its own? That doesn't seem > very sensible. > > If you want to test whether symmetry holds overall this should be > simple. In your second email you presented estimates from the > constrained model, I presume you have the estimates for the > unconstrained model - all you need to do to see if symmetry can be > rejected for your data and model is to look at the likelihood ratio > statistics. > > Kind regards, > > Alex > > > > On 12 May 2011 05:22, Ana <[email protected]> wrote: >> Dear Alex, >> Thank you very much for your prompt response and for your help. >> I'm still with a silly question about the symmetry test. >> Based on your routine below, how could I distinguish the parameters fo >> interst for the symmetry test (g12 g21 g31 g13...) from the other >> parameters of the model? >> >> Still, sometimes (for other exercises I'm planning to do), I'd like to >> keep only some parameters from the model and make some test. >> How can I "view "and "use" the some parameters from the model? >> In the case of ther symmetry test (if I only use the unrestricted >> model), I tried to use something like [eq_1]g12 = [eq_2]g2, but stata >> (actually, me!) always complain with something about: "equation [1] >> not found". >> Here is the estimates/results I can get from using nlsur quaids based >> on my data: >> >> FGNLS regression >> >> Equation Obs Parms RMSE R-sq Constant >> >> 1 w1 26784 . .4765981 0.7898* (none) >> 2 w2 26784 . .5114466 0.3840* (none) >> 3 w3 26784 . .4442428 0.3384* (none) >> >> * Uncentered R-sq >> >> >> Coef. Std. Err. z P>z [95% Conf. Interval] >> >> /a1 1.461867 .0214499 68.15 0.000 1.419826 1.503908 >> /a2 .316065 .0206387 15.31 0.000 .2756139 .3565162 >> /a3 .292436 .0186566 15.67 0.000 .2558698 .3290022 >> /b1 -.6577555 .0084112 -78.20 0.000 -.6742412 -.6412698 >> /b2 -.0759965 .007929 -9.58 0.000 -.091537 -.060456 >> /b3 -.1354168 .0072402 -18.70 0.000 -.1496074 -.1212263 >> /g11 -1.520055 .045084 -33.72 0.000 -1.608418 -1.431692 >> /g12 -.0109163 .0207699 -0.53 0.599 -.0516245 .029792 >> /g13 -.399293 .0196141 -20.36 0.000 -.4377359 -.3608502 >> /g22 -.0250661 .0151875 -1.65 0.099 -.054833 .0047007 >> /g23 -.0521908 .01053 -4.96 0.000 -.0728293 -.0315523 >> /g33 -.0643672 .0144734 -4.45 0.000 -.0927346 -.0359998 >> /l1 .0855152 .0007695 111.13 0.000 .084007 .0870233 >> /l2 .0143847 .0007215 19.94 0.000 .0129705 .0157989 >> /l3 .021068 .0006599 31.93 0.000 .0197747 .0223613 >> >> >> . >> end of do-file >> >> >> Thanks a lot in advance.Again. >> Best regards, >> Ana. >> >> 2011/5/10 Alex Olssen <[email protected]>: >>> Dear Ana, >>> >>> I presume you removed the symmetry restriction by adjusting the >>> variables `gij' = `gji' in the nlsurquaids.ado file. >>> >>> To test the symmetry restrictions you could, >>> >>> 1) rename the program without symmetry as nlsurquaids2.ado >>> >>> 2) run the program without symmetry and obtain the log likelihood >>> >>> scalar llnosymmetry = e(ll) >>> >>> 3) run the program with symmetry (the original nlsurquaids) and obtain >>> the log likelihood >>> >>> scalar llsymmetry = e(ll) >>> >>> 4) implement the likelihood ratio test >>> >>> the statistic is given by 2*(llnosymmetry - llsymmetry) >>> which follows a chi-squared distribution with the number of >>> restrictions as the degrees of freedom. >>> >>> Kind regards, >>> >>> Alex Olssen >>> >>> On 11 May 2011 11:37, Ana <[email protected]> wrote: >>>> Dear Statalisters, >>>> >>>> I'm using Brian Pois nlsurquaids.ado to estimate a Four Demand Equations. >>>> I've excluded the symmetry restriction from this program in order to >>>> test this restriction. >>>> >>>> My model has the form: >>>> nlsur quaids @ w1 w2 w3 lnp1-lnp4 lnm, ifgnls nequations(3) param(a1 >>>> a2 a3 b1 b2 b3 g11 g12 g13 g21 g22 g23 g31 g32 g33 l1 l2 l3) nolog >>>> >>>> >>>> Does anybody know how to test the symmetry restriction? >>>> I want to test if: g12=g21 g13=g31 g23=g32! >>>> >>>> Thanks a lot in advance. >>>> Best regards, >>>> Ana. >>>> * >>>> * 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/ >>>> >>> >>> * >>> * 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/ >>> >> >> * >> * 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/ >> > > * > * 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/ > * * 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/

**Follow-Ups**:**Re: st: Symmetry Test***From:*"Brian P. Poi" <[email protected]>

**References**:**st: Symmetry Test***From:*Ana <[email protected]>

**Re: st: Symmetry Test***From:*Alex Olssen <[email protected]>

**Re: st: Symmetry Test***From:*Ana <[email protected]>

**Re: st: Symmetry Test***From:*Alex Olssen <[email protected]>

- Prev by Date:
**Re: st: RE: Data Setup for Survival Analysis With Unequal Interval** - Next by Date:
**st: Carryforward oddity** - Previous by thread:
**Re: st: Symmetry Test** - Next by thread:
**Re: st: Symmetry Test** - Index(es):