This package provides a command to decompose the growth of an average quantity in a top percentile (in particular, the average wealth). This implements the accountiong framework defined in my paper Decomposing the Growth of Top Wealth Shares.
topdecompose varname [, top(dummyvariable) save(filename) replace clear Detail]
where
varname
is the variable to decomposetop
is a dummy variable indicating whether the observation belongs to the top percentile or notfilename
a filepath to save the output as a dataset. Alternatively,clear
to clear the existing dataset with the output.Detail
provides more intermediary quantities (e.g. average quantity in subsets of individuals)
The dataset needs to be declared as panel data before the command (using tsset
or xtsset
)
net install topdecompose from("https://raw.githubusercontent.com/matthieugomez/topdecompose/master/")
If you have a version of Stata < 13, you need to install it manually
Click the "Download ZIP" button in the right column to download a zipfile.
Extract it into a folder (e.g. ~/SOMEFOLDER)
Run
net install topdecompose, from("~/SOMEFOLDER")