Resources

Getting Started Example 1 for PROC QUANTREG

/****************************************************************/
/*          S A S   S A M P L E   L I B R A R Y                 */
/*                                                              */
/*    NAME: qreggs1                                             */
/*   TITLE: Getting Started Example 1 for PROC QUANTREG         */
/* PRODUCT: STAT                                                */
/*  SYSTEM: ALL                                                 */
/*    KEYS: Quantile Regression                                 */
/*                                                              */
/*   PROCS: QUANTREG                                            */
/*    DATA:                                                     */
/*                                                              */
/* SUPPORT: Guixian Lin                                         */
/*     REF:                                                     */
/*    MISC:                                                     */
/****************************************************************/

data trout;
   input Density WDRatio LnDensity @@;
   datalines;
 0.38732     8.6819    -0.94850    1.16956    10.5102     0.15662
 0.42025    10.7636    -0.86690    0.50059    12.7884    -0.69197
 0.74235    12.9266    -0.29793    0.40385    14.4884    -0.90672
 0.35245    15.2476    -1.04284    0.11499    16.6495    -2.16289
 0.18290    16.7188    -1.69881    0.06619    16.7859    -2.71523
 0.70330    19.0141    -0.35197    0.50845    19.0548    -0.67639
 0.06279    19.4959    -2.76796    0.14190    19.9446    -1.95265
 0.25725    20.7852    -1.35772    0.27240    21.0870    -1.30048
 0.27983    21.4564    -1.27357    0.12860    22.0917    -2.05105
 0.57867    22.1627    -0.54702    0.79667    22.4070    -0.22731
 0.03730    22.8553    -3.28880    0.27897    23.2003    -1.27666
 0.52587    23.6662    -0.64270    0.15075    23.6937    -1.89215
 0.10071    23.9129    -2.29548    0.16128    24.6643    -1.82461
 0.09254    24.9451    -2.38011    0.23937    24.9492    -1.42974
 0.06914    25.4138    -2.67158    0.17586    26.4412    -1.73805
 0.43725    26.8025    -0.82725    0.07812    28.0558    -2.54945
 0.06576    28.1194    -2.72174    0.26539    28.3045    -1.32654
 0.05159    28.3949    -2.96440    0.13779    29.4083    -1.98202
 0.55589    30.9569    -0.58719    0.29714    31.3376    -1.21354
 0.10857    31.7868    -2.22035    0.03897    31.9464    -3.24485
 0.53572    32.2492    -0.62414    0.26580    32.3725    -1.32500
 0.22114    33.1017    -1.50896    0.44212    33.3530    -0.81618
 0.07646    33.4036    -2.57099    0.47616    33.8079    -0.74200
 0.45934    34.5639    -0.77796    0.22627    34.7844    -1.48603
 0.19356    35.0004    -1.64215    0.29216    35.1803    -1.23045
 0.23243    35.2959    -1.45917    0.08155    35.3704    -2.50654
 0.19528    35.9115    -1.63332    0.22023    35.9382    -1.51308
 0.16411    36.4884    -1.80723    0.11296    36.7694    -2.18072
 0.49981    36.9893    -0.69353    0.40012    37.0055    -0.91599
 0.42912    37.7344    -0.84601    0.15294    38.0394    -1.87770
 0.31935    38.4524    -1.14147    0.30667    38.9076    -1.18198
 0.21722    40.0388    -1.52685    0.44777    42.2364    -0.80347
 0.41371    43.6465    -0.88259    0.32136    44.4753    -1.13520
 0.35369    44.7545    -1.03935    0.09101    44.9001    -2.39684
 0.11982    46.6135    -2.12175    0.16831    47.4509    -1.78197
 0.25125    54.6916    -1.38129
;

ods graphics on;

proc quantreg data=trout alpha=0.1 ci=resampling;
   model LnDensity = WDRatio / quantile=0.5 0.9
                               CovB seed=1268;
   test WDRatio / wald lr;
run;

proc quantreg data=trout alpha=0.1 ci=resampling;
   model LnDensity = WDRatio / quantile=process seed=1268
                               plot=quantplot;
run;