Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: fundamental terms


From   "Andreas Aschbacher" <aa_surf@gmx.at>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: fundamental terms
Date   Fri, 27 Feb 2004 15:26:29 +0100 (MET)

genial !

summ x, detail
> scalar meanx = r(mean)
> scalar medianx = r(p50)
> g var1 = abs(x-meanx)
> summ var1
> scalar d1 = r(mean)
> g var2 = abs(x-medianx)
> summ var2
> scalar d2= r(mean)
> di "d1 = " d1 "and  d2 = " d2
> 
> Andreas Aschbacher wrote:
> 
> >dear fellows !
> >
> >I have a sample with n observations :
> >are there commands for:
> >   a)  d1 = 1/n*SUMME(i=1 until n)[|x(i)-x_arithmetic|]
> >   b)  d2 = 1/n*SUMME(i=1 until n)[|x(i)-median|]
> >??
> >|..| means absolut value
> >x_arithmetic ... arithmetic mean
> >thank you very much
> >andreas aschbacher
> >
> >
> >
> 
> 
> *
> *   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/
> 

-- 
GMX ProMail (250 MB Mailbox, 50 FreeSMS, Virenschutz, 2,99 EUR/Monat...)
jetzt 3 Monate GRATIS + 3x DER SPIEGEL +++ http://www.gmx.net/derspiegel +++

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



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index