{smcl} {* *! version 1.0.0 24jul2010}{...} {hline} {cmd:help nrpec}{right:Michal Brzezinski (July 2010)} {hline} {title:Title} {p2colset 5 16 20 2}{...} {p2col: {hi:nrpec} {hline 2}}Estimate the number ({it:k}) of extreme order statistics used for fitting the Pareto model to upper tails of distributions{p_end} {p2colreset}{...} {title:Syntax} {p 4 4 2} {cmd:nrpec} [{varname}] [{cmd:,} {it:options}] {synoptset 20 tabbed}{...} {synopthdr} {synoptline} {synopt:{bf:k({it:scalar})}}the maximum number of extreme order statistics used in estimation{p_end} {synopt:{bf:x0({it:scalar})}}the minimum value of {it:varname} used in estimation{p_end} {p 4 4 2} If neither {it:k} nor {it:x0} options are used, {cmd:nrpec} searches for optimal {it:k} over the whole range of {it:varname}. {title:Description} {p 4 4 2} {cmd:nrpec} estimates the number {it:k} of extreme ordered statistics (e.g. highest incomes) for fitting the Pareto model to the upper tail of the distribution. It uses the (non-robust) Pareto error criterion (C-criterion) introduced in Dupuis and Victoria-Feser (2006). Estimating {it:k} is equivalent to estimating the scale parameter {it:x0} of the Pareto distribution: k = SUM I({it:varname} >= {it:x0}), where I is the indicator function. The estimated {it:x0} can be then used in fitting Pareto model by, e.g., ML method, see {help paretofit}. {p 4 4 2} For an implementation of Pareto error criterion for choosing {it:k}, also introduced in Dupuis and Victoria-Feser (2006), which is robust to extreme observations, see {help rpec}, if installed. {title:Examples} {pstd}To search for optimal {it:k} over the whole range of {it:varname}:{p_end} {phang2}{cmd:. nrpec {it:varname} }{p_end} {pstd}To search for optimal {it:k} among the 50 largest values of {it:varname}{p_end} {phang2}{cmd:. nrpec {it:varname}, k(50)}{p_end} {pstd}To search for optimal {it:k} among the values of {it:varname} >= 10000{p_end} {phang2}{cmd:. nrpec {it:varname}, x0(10000)}{p_end} {title:References} {phang} Dupuis, Debbie J. and Victoria-Feser, Maria-Pia (2006). A Robust Prediction Error Criterion for Pareto Modelling of Upper Tails. {it:The Canadian Journal of Statistics}, {cmd: 34} (4), 639-658. {title:Also see} {p 4 13 2} Online: help for {help rpec}, {help paretofit}, {help hillp} if installed. {title:Author} {p 4 4 2} Michal Brzezinski , Faculty of Economic Sciences, University of Warsaw, Poland.