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

From |
"Nick Cox" <n.j.cox@durham.ac.uk> |

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

Subject |
RE: st: significance of mean and median |

Date |
Tue, 25 Nov 2008 15:28:29 -0000 |

I take Ronan's point, but there is a difference here. -regress- and -ttest- are working with the standard Gaussian or normal machinery that statistically minded people expect to be used for means. -qreg- as a test for medians does not correspond to any of the customary non-parametric tests that might be expected to be used for medians. I am not saying that's a problem; it is more by way of a signal. Nick n.j.cox@durham.ac.uk Ronan Conroy On 24 Nov 2008, at 11:55, Bastian Steingros wrote: > After creating the descriptive statistics of my sample I want to > show that the mean of a certain variable is statistically significant. > For example the mean of var1 is 0,45. Now I want to show that the > positive sign is significant. A regression without any predictor variable is a constant-only model, and the test for significance of the constant is a test that the constant is zero. . sysuse auto (1978 Automobile Data) . regress mpg Source | SS df MS Number of obs = 74 -------------+------------------------------ F( 0, 73) = 0.00 Model | 0 0 . Prob > F = . Residual | 2443.45946 73 33.4720474 R-squared = 0.0000 -------------+------------------------------ Adj R-squared = 0.0000 Total | 2443.45946 73 33.4720474 Root MSE = 5.7855 ------------------------------------------------------------------------ ------ mpg | Coef. Std. Err. t P>|t| [95% Conf. Interval] ------------- +---------------------------------------------------------------- _cons | 21.2973 .6725511 31.67 0.000 19.9569 22.63769 ------------------------------------------------------------------------ ------ The coefficient for the constant is the mean of the data (since the mean is the statistic that minimises prediction error, when we define prediction error as the squared difference between observed and expected). Similarly, quantile regression will test that the median is zero . qreg mpg Iteration 1: WLS sum of weighted deviations = 330.13202 Iteration 1: sum of abs. weighted deviations = 330 Iteration 2: sum of abs. weighted deviations = 328 Median regression Number of obs = 74 Raw sum of deviations 328 (about 20) Min sum of deviations 328 Pseudo R2 = 0.0000 ------------------------------------------------------------------------ ------ mpg | Coef. Std. Err. t P>|t| [95% Conf. Interval] ------------- +---------------------------------------------------------------- _cons | 20 .7799751 25.64 0.000 18.44551 21.55449 ------------------------------------------------------------------------ ------ the median being the statistic which minimises error, when we define error as the absolute difference between the observed and expected. * * 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**:**st: significance of mean and median***From:*"Bastian Steingros" <Steingros@gmx.de>

**Re: st: significance of mean and median***From:*Ronan Conroy <rconroy@rcsi.ie>

- Prev by Date:
**st: RE: tests to check robustness of intruments in xtivreg** - Next by Date:
**Re: st: Bivariate density contours** - Previous by thread:
**R: RE: st: significance of mean and median** - Next by thread:
**st: Three dimmensions panel data** - Index(es):

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