
PROC REG EXAMPLES, FOLLOWING UP ON SCRIPT   Corr.Log
====================================================

data meat; 
    input   yr pbe cbe ppo cbo pfo dinc cfo rdinc rfp ;
    datalines;
1925    59.7   58.6   60.5   65.8   65.8   51.4  90.9 68.5  877
1926    59.7   59.4   63.3   63.3   68.0   52.6  92.1 69.6  899
1927    63.0   53.7   59.9   66.8   65.5   52.1  90.9 70.2  883
1928    71.0   48.1   56.3   69.9   64.8   52.7  90.9 71.9  884
1929    71.0   49.0   55.0   68.7   65.6   55.1  91.1 75.2  895
1930    74.2   48.2   59.6   66.1   62.4   48.8  90.7 68.3  874
1931    72.1   47.9   57.0   67.4   51.4   41.5  90.0 64.0  791
1932    79.0   46.0   49.5   69.7   42.8   31.4  87.8 53.9  733
1933    73.1   50.8   47.3   68.7   41.6   29.4  88.0 53.2  752
1934    70.2   55.2   56.6   62.2   46.4   33.2  89.1 58.0  811
1935    82.2   52.2   73.9   47.7   49.7   37.0  87.3 63.2  847
1936    68.4   57.3   64.4   54.4   50.1   41.8  90.5 70.5  845
1937    73.0   54.4   62.2   55.0   52.1   44.5  90.4 72.5  849
1938    70.2   53.6   59.9   57.4   48.4   40.8  90.6 67.8  803
1939    67.8   53.9   51.0   63.9   47.1   43.5  93.8 73.2  793
1940    63.4   54.2   41.5   72.4   47.8   46.5  95.5 77.6  798
1941    56.0   60.0   43.9   67.4   52.2   56.3  97.5 89.5  830
     ; run;

options nocenter nodate linesize=70;

* WANT TO COMPARE SIG LEVELS from PROC CORR vs PROC REG;

proc corr data=Meat;
   var pbe cbe dinc; with cfo; run;


  Pearson Correlation Coefficients, N = 17
         Prob > |r| under H0: Rho=0

              pbe           cbe          dinc

cfo      -0.77336       0.50682       0.65784
           0.0003        0.0379        0.0041

   proc reg data=Meat;
    model pbe cbe dinc = cfo  ;
    output out= meatfil1
        p = pbe1 cbe1 dinc1 ;
        run;

Dependent Variable: pbe
                               Parameter Estimates

                     Parameter       Standard
Variable     DF       Estimate          Error    t Value    Pr > |t|

Intercept     1      254.75011       39.31939       6.48      <.0001
cfo           1       -2.04043        0.43188      -4.72      0.0003


Dependent Variable: cbe 
                               Parameter Estimates

                     Parameter       Standard
Variable     DF       Estimate          Error    t Value    Pr > |t|

Intercept     1      -22.20667       33.08061      -0.67      0.5122
cfo           1        0.82736        0.36336       2.28      0.0379


Dependent Variable: dinc
                               Parameter Estimates

                     Parameter       Standard
Variable     DF       Estimate          Error    t Value    Pr > |t|

Intercept     1     -146.97690       56.66144      -2.59      0.0203
cfo           1        2.10536        0.62237       3.38      0.0041

  proc print data=meatfil1 (obs=12);
            var yr pbe pbe1 cbe cbe1 dinc dinc1;
         title "Predictors vs Observations, Meat Data"; run;

Predictors vs Observations, Meat Data                              

Obs     yr      pbe      pbe1      cbe      cbe1     dinc     dinc1

  1    1925    59.7    69.2749    58.6    53.0006    51.4    44.4006
  2    1926    59.7    66.8264    59.4    53.9935    52.6    46.9270
  3    1927    63.0    69.2749    53.7    53.0006    52.1    44.4006
  4    1928    71.0    69.2749    48.1    53.0006    52.7    44.4006
  5    1929    71.0    68.8668    49.0    53.1661    55.1    44.8217
  6    1930    74.2    69.6830    48.2    52.8352    48.8    43.9795
  7    1931    72.1    71.1113    47.9    52.2560    41.5    42.5058
  8    1932    79.0    75.6002    46.0    50.4358    31.4    37.8740
  9    1933    73.1    75.1921    50.8    50.6013    29.4    38.2951
 10    1934    70.2    72.9476    55.2    51.5114    33.2    40.6110
 11    1935    82.2    76.6204    52.2    50.0221    37.0    36.8213
 12    1936    68.4    70.0910    57.3    52.6697    41.8    43.5585

