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

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

From |
"Feiveson, Alan H. (JSC-SK311)" <alan.h.feiveson@nasa.gov> |

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

Subject |
RE: st: RE: RE: A math question |

Date |
Fri, 21 Dec 2012 10:29:38 -0600 |

You can't optimize a function of median |ei| by setting it's derivative to zero because the partial derivatives don't exist at ei = 0. You would have do something like linear programming (as is done in LAD regression). -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of CJ Lan Sent: Friday, December 21, 2012 10:10 AM To: statalist@hsphsun2.harvard.edu Subject: RE: st: RE: RE: A math question What happens is the following: Recall the Huber weighting functions in the robust estimator is defined as (k= tuning constant and sigma is the robust estimate of the "scale" used to standardize the errors) w=1, if |e|<=k*sigma w=k*sigma/|e|, if |e|>k*sigma Sigma (aka scale) in several software including Stata (I believe) is defaulted as MAE/norminv(0.75), where MAE = median of absolute errors = median{|ei|, i=1,...,n}. n=no. of data points. "Norminv" is the inverse of standard normal fun. e = estimation error = y - u(b,x). Now, what I try to do is to compute the derivative as well as Hessian of the weights, w, with respect to the parameters b. Both Sigma and errors are a function of b. I am stuck at taking derivative of the Sigma wrt b, because it involves with the "median". -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of David Hoaglin Sent: Friday, December 21, 2012 10:52 AM To: statalist@hsphsun2.harvard.edu Subject: Re: st: RE: RE: A math question The median is a function of a distribution. You did not specify the distribution of x. If you explained the context for your question, we might be able to shed better light. David Hoaglin On Fri, Dec 21, 2012 at 10:42 AM, CJ Lan <CJ@jupiter.fl.us> wrote: > Al, > > I think the "median" is a function, just like the "mean" is a function, not just a number. > > BTW, the derivative of abs(x^3) should be 3*x*abs(x) because the > derivative can be derived as > abs(x^3)/(x^3)*(3*x^2) = 3*abs(x)*x^2/x = 3*x*abs(x). > > I wish others could shed a light too? Thx. * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/ PLEASE NOTE: Florida has a very broad public records law. Most written communications to or from the Town of Jupiter officials and employees regarding public business are public records available to the public and media upon request. Your e-mail communications may be subject to public disclosure. Under Florida law, e-mail addresses are public records. If you do not want your e-mail address released in response to a public records request, do not send electronic mail to this entity. Instead, contact this office by phone or in writing. The views expressed in this message may not necessarily reflect those of the Town of Jupiter. If you have received this message in error, please notify us immediately by replying to this message, and please delete it from your computer. Thank you. This message has been scanned for malware by Websense. www.websense.com * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/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/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**Re: st: RE: RE: A math question***From:*"JVerkuilen (Gmail)" <jvverkuilen@gmail.com>

**References**:**st: A math question***From:*CJ Lan <CJ@jupiter.fl.us>

**st: RE: A math question***From:*"Feiveson, Alan H. (JSC-SK311)" <alan.h.feiveson@nasa.gov>

**st: RE: RE: A math question***From:*CJ Lan <CJ@jupiter.fl.us>

**Re: st: RE: RE: A math question***From:*David Hoaglin <dchoaglin@gmail.com>

**RE: st: RE: RE: A math question***From:*CJ Lan <CJ@jupiter.fl.us>

- Prev by Date:
**Re: st: RE: RE: A math question** - Next by Date:
**RE: st: RE: RE: A math question** - Previous by thread:
**Re: st: RE: RE: A math question** - Next by thread:
**Re: st: RE: RE: A math question** - Index(es):