*! version 1.0 20Dec2014

help percat

Title

percat - percentile-based categorisation

percat
varlist
[if exp] [in range]
[, options]

Description

With percat, one can categorise a continous variable based on percentiles
provided by the programme. The default option is the 50th percentile (median),
meaning that percat will convert the chosen variable into a dummy variable
using the median split procedure. For other options, see below:

options

b25, categorises bottom 25% in the first, and the rest in the second category
bt25, categorises bottom 25% in the first, and top 25% in the second category
t25, categorises bottom 75% in the first, and top 25% in the second category
f25, categorises in four equal segments (25% each)

KW: categorical
KW: percentile
KW: dummy

Examples

. sysuse auto, clear

. percat price

. percat price, b25

. percat price, bt25

. percat price, t25

. percat price, f25

. sysuse auto, clear

. percat price if foreign==1

. sysuse auto, clear

. percat price in 1/25

. sysuse auto, clear

. percat price mpg turn

Author

Mehmet Mehmetoglu
Department of Psychology
Norwegian University of Science and Technology
mehmetm@svt.ntnu.no