Tables and axes > Statistical functions and totals > Creating percentiles and medians
 
Creating percentiles and medians
Quick reference
To create a percentile element using factors, type:
n30[element_text];fac=factor[;dec=dec_places]
factor is 50 for a median but can be any number between 1 and 100 depending on the calculation required.
To create a percentile element using values from the data, type:
n01[element_text];inc=variable;percentile=factor;c=log_expr
factor is 25 for a quartile but can be any number between 1 and 100 depending on the calculation required.
More information
There are two ways of calculating percentiles: with factors (fac=) or with multipliers (inc=). Multipliers are more accurate and are used when the data contains the actual answer the respondent gave rather than a code representing a range of responses. Factors are used when responses have been coded into ranges.
See
Percentiles from factors
Percentiles based on numeric variables
Interpolation with percentiles
See also
Statistical functions and totals