Wednesday, January 04, 2006

st: solving equations with stata

Hi, I am trying to perform a downweighting process for a dataset I am working on (for an outbreak detection system of infectious diseases based on the Farrington method). As part of the process I have got to a point were I have a list of residuals (res). I need to create weights for the original data based on these residuals using the following formulas: weight = a * res ^ -2 where a is a constant such that: sum of all weights = n

where n is the number of observations (n is 35 or less with this method) I'm sure there is a relatively straight forward way of doing this in stata, but I cant seem to find it. Can anyone help me out, thanks Gianfranco

-------------------------------------------------------------

Gianfranco Spiteri CDSC (NI) McBrien Building Belfast City Hospital Lisburn Road Belfast BT9 7AB

Gianfranco.Spiteri@hpa.org.uk Tele: +44 (0) 28 90263765 Fax: +44 (0) 028 90263511

----------------------------------------- *********************************************************************** *** The information contained in the EMail and any attachments is confidential and intended solely and for the attention and use of the named addressee(s). It may not be disclosed to any other person without the express authority of the HPA, or the intended recipient, or both. If you are not the intended recipient, you must not disclose, copy, distribute or retain this message or any part of it. This footnote also confirms that this EMail has been swept for computer viruses, but please re-sweep any attachments before opening or saving. HTTP://www.HPA.org.uk ************************************************* *************************

* * 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/


Tag:


Links to this post:

Create a Link



<< Home

This page is powered by Blogger. Isn't yours?