1 / 7

Regressions

Regressions. Regression Here are simple uses of proc reg for standard problems: proc reg; /* simple linear regression */ model y = x; proc reg; /* weighted linear regression */ model y = x; weight w; proc reg; /* multiple regression */

brody
Download Presentation

Regressions

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Regressions • Regression • Here are simple uses of proc reg for standard problems: • proc reg; /* simple linear regression */ • model y = x; • proc reg; /* weighted linear regression */ • model y = x; • weight w; • proc reg; /* multiple regression */ • model y = x1 x2 x3;

  2. model y = x / noint; /* regression with no intercept */ model y = x / ss1; /* print type I sums of squares */ model y = x / p; /* print predicted values and residuals */ model y = x / r; /* option p plus residual diagnostics */ model y = x / clm; /* option p plus 95% CI for estimated mean */ model y = x / cli; /* option p plus 95% CI for predicted value */ model y = x / r cli clm; /* options can be combined */

  3. model y = x / covb; /* covariance matrix for estimates */ model y = x / collin; /* collinearity diagnostic */ model y = x / collinoint; /* collin without intercept */ The output phrase can have several keywords (which can be used together): output out=b predicted=py; /* predicted values in "py" */ output out=b p=py; /* same as predicted */ output out=b residual=ry; /* residual values in "ry" */ output out=b r=ry; /* same as residual */ output out=b stdr=sr; /* standard error of residuals "sr" */ output out=b student=sy; /* studentized residuals "sy" */

  4. proc glm; /* analysis of covariance */ class trt; /* trt = factor, x = covariate */ model y = x trt; proc glm; /* analysis of covariance */ class trt; /* with different slopes */ model y = x trt x*trt;

  5. proc glm; /* simple linear regression */ model y = x / solution; proc glm; /* weighted linear regression */ model y = x / solution; weight w; proc glm; /* multiple regression */ model y = x1 x2 x3 / solution; proc glm; /* one-way analysis of variance */ class trt; model y = trt; proc glm; /* additive two-factor anova */ class fert var; model y = fert var; proc glm; /* full two-factor anova */ class fert var; model y = fert | var; proc glm; /* analysis of covariance */ class trt; /* trt = factor, x = covariate */ model y = x trt; data testlin; set resps; x = level; proc glm; /* test for non-linearity */ class level; resp = x level;

  6. model y = trt x / solution; /* print parameter estimates and SEs */ model y = x / noint; /* no intercept (as in proc reg) */ model y = x / ss1; /* print only type I sums of squares */ model y = x / ss2; /* print only type II sums of squares */ model y = x / p; /* print predicted values and residuals */ model y = x / clm; /* option p plus 95% CI for estimated mean */ model y = x / cli; /* option p plus 95% CI for predicted value */ model y = x / cli alpha=.01; /* only .01, .05 and .10 available */

More Related