Stata 15 help for centile

[R] centile -- Report centile and confidence interval

Syntax

centile [varlist] [if] [in] [, options]

options Description ------------------------------------------------------------------------- Main centile(numlist) report specified centiles; default is centile(50)

Options cci binomial exact; conservative confidence interval normal normal, based on observed centiles meansd normal, based on mean and standard deviation level(#) set confidence level; default is level(95) ------------------------------------------------------------------------- by and statsby are allowed; see prefix.

Menu

Statistics > Summaries, tables, and tests > Summary and descriptive statistics > Centiles with CIs

Description

centile estimates specified centiles and calculates confidence intervals. If no varlist is specified, centile calculates centiles for all the variables in the dataset. If no centiles are specified, medians are reported.

By default, centile uses a binomial method for obtaining confidence intervals that makes no assumptions about the underlying distribution of the variable.

Options

+------+ ----+ Main +-------------------------------------------------------------

centile(numlist) specifies the centiles to be reported. The default is to display the 50th centile. Specifying centile(5) requests that the fifth centile be reported. Specifying centile(5 50 95) requests that the 5th, 50th, and 95th centiles be reported. Specifying centile(10(10)90) requests that the 10th, 20th, ..., 90th centiles be reported.

+---------+ ----+ Options +----------------------------------------------------------

cci (conservative confidence interval) forces the confidence limits to fall exactly on sample values. Confidence intervals displayed with the cci option are slightly wider than those with the default (nocci) option.

normal causes the confidence interval to be calculated by using a formula for the standard error of a normal-distribution quantile given by Kendall and Stuart (1969, 237). The normal option is useful when you want empirical centiles -- that is, centiles based on sample order statistics rather than on the mean and standard deviation -- and are willing to assume normality.

meansd causes the centile and confidence interval to be calculated based on the sample mean and standard deviation, and it assumes normality.

level(#) specifies the confidence level, as a percentage, for confidence intervals. The default is level(95) or as set by set level.

Examples

Setup . sysuse auto

Calculate the 50th centile for all variables in the dataset . centile

Calculate the 50th centile for price . centile price

Calculate the 50th centile for price, showing 99% CI . centile price, level(99)

Calculate the 5th, 50th, and 95th centiles for price . centile price, centile(5 50 95)

Calculate the 10th, 20, 30th, ..., 90th centiles for price . centile price, centile(10(10)90)

Calculate the 10th centile for price, assuming normality . centile price, centile(10) normal

Stored results

centile stores the following in r():

Scalars r(N) number of observations r(n_cent) number of centiles requested r(c_#) value of # centile r(lb_#) #-requested centile lower confidence bound r(ub_#) #-requested centile upper confidence bound

Macros r(centiles) centiles requested

Reference

Kendall, M. G., and A. Stuart. 1969. The Advanced Theory of Statistics, Vol. 1: Distribution Theory. 3rd ed. London: Griffin.


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