Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

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

From |
Jorge Eduardo Pérez Pérez <perez.jorge@ur.edu.co> |

To |
"statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |

Subject |
Re: st: robust estimation SUREG |

Date |
Sat, 28 May 2011 14:19:49 -0400 |

A geometric mean might be more appropiate, so the final weight is zero if any of them is zero. An alternative is to run the SUR manually, stacking the variables, correcting for the error covariance and estimating with -reg- at the end. In this case, you could do the last step with -rreg- instead of -reg-. -rreg- does not allow a -nocons- option, so you would have to modify its call to -reg-. See the code below. -- Begin code ---- sysuse auto, clear * Benchmark sureg (price weight trunk) (length trunk) est store sur * Obtain errors reg price weight trunk predict e1, resid reg length trunk predict e2, resid * Obtain covariance cor e1 e2, cov mat s = r(C) mat i = I(_N) mat v = s#i * Stack dependent gen zero=0 stack price weight trunk zero length zero zero trunk, into(y weight trunk trunk2) clear gen cons1 =(_stack==1) gen cons2 =(_stack==2) * Transform variables mkmat weight trunk cons1 trunk2 cons2, matrix(X) drop weight trunk cons1 trunk2 cons2 matrix Xa=(cholesky(inv(v))'*X) svmat Xa, names(col) mkmat y drop y matrix ya=(cholesky(inv(v))'*y) svmat ya, names(col) reg y weight trunk cons1 trunk2 cons2, hascons * Which is same as SUR, se needs adjustment est replay sur * Now run robust instead, does not have nocons option. Would have to modify the call to -reg- in rreg.ado rreg y weight trunk cons1 trunk2 cons2 -- End code ---- _______________________ Jorge Eduardo Pérez Pérez On Sat, May 28, 2011 at 9:27 AM, pierrick.jan@art.admin.ch <pierrick.jan@art.admin.ch> wrote: > Thanks a lot for your answer!! I have also tried to perform a SUREG by introducing > the three sets of weights generated by the rreg command but I realized that it was not > possible. As you mention I would have to combine them somehow. However it is for me > not clear how to combine them. An arithmetic average is definitely not appropriate. I was > wondering if it would not be more appropriate to proceed as described hereafter. In a first step, > on the basis of each robust regression performed, I determine outliers (i.e. observations under a > certain threshold in terms of weight height). In a second step I exclude these outliers from the data set > and then perform the SUR regression. I am however not really satisfied with this solution. > > Pierrick Jan > __________________________________________________________________________ > > Date: Fri, 27 May 2011 12:47:38 -0400 > From: =?ISO-8859-1?Q?Jorge_Eduardo_P=E9rez_P=E9rez?= <perez.jorge@ur.edu.co> > Subject: Re: st: robust estimation SUREG > > You could use the -genwt- option in -rreg- to generate the weights > used in the robust regression, then use those weights in -sureg-. You > will have three sets of weights from your first three regressions, and > - -sureg- will only allow a set of weights, so you would have to combine > them somehow. > _______________________ > Jorge Eduardo Pérez Pérez > > > * > * 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/

**References**:**Re: st: robust estimation SUREG***From:*<pierrick.jan@art.admin.ch>

- Prev by Date:
**re: st:mhbounds vs rbounds** - Next by Date:
**st: gllamm ordered probit models** - Previous by thread:
**Re: st: robust estimation SUREG** - Next by thread:
**Re: Re: st: robust estimation SUREG** - Index(es):