The QUANTREG Procedure
22. October 2007 12:40The QUANTREG procedure models the effects of covariates on the conditional quantiles of a response variable by means of quantile regression.Quantile regression, which was introduced by Koenker and Bassett (1978), extends the regression model to conditional quantiles of the response variable, such as the median or the 90th percentile. Quantile regression is particularly useful when the rate of change in the conditional quantile, expressed by the regression coefficients, depends on the quantile.
Quantile regression is also flexible in the sense that it does not involve a link function that relates the variance and the mean of the response variable.
Quantile regression also offers a degree of data robustness.
Quantile regression cannot be carried out simply by segmenting the unconditional distribution of the response variable and then obtaining least-squares fits for the subsets. This approach leads to disastrous results when, for example, the data include outliers. In contrast, quantile regression uses all of the data for fitting quantiles, even the extreme quantiles.
proc quantreg data=trout alpha=0.01 ci=resampling; model LnDensity = WDRatio / quantile=0.9 CovB CorrB seed=12345; test WDRatio; run; ods html; ods graphics on; proc quantreg data=trout alpha=0.1 ci=resampling; model LnDensity = WDRatio / quantile=all seed=12345 plot=quantplot; run; ods graphics off; ods html close; %macro quantiles(NQuant, Quantiles); %do i=1 %to &NQuant; proc quantreg data=bmimen ci=none algorithm=interior; model logbmi = inveage sqrtage age sqrtage*age age*age age*age*age / quantile=%scan(&Quantiles,&i,","); output out=outp&i pred=p&i; run; %end; %mend; %let quantiles = %str(.03,.05,.10,.25,.5,.75,.85,.90,.95,.97); %quantiles(10,&quantiles);

Email 