Biostat Lab Section PROC REG - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

Biostat Lab Section PROC REG

Description:

proc reg data=fitness; model Oxygen=Age Weight RunTime RunPulse RestPulse MaxPulse ... symbol1 c=black i=none v=plus; symbol2 c=black i=spline v=none; proc ... – PowerPoint PPT presentation

Number of Views:133
Avg rating:3.0/5.0
Slides: 16
Provided by: carr133
Category:
Tags: proc | reg | biostat | black | fitness | lab | models | section

less

Transcript and Presenter's Notes

Title: Biostat Lab Section PROC REG


1
Biostat Lab Section PROC REG
  • Yu-Fen Li

2
PROC REG
proc reg datafitness model OxygenAge
Weight RunTime RunPulse RestPulse MaxPulse
/ selectionforward model
OxygenAge Weight RunTime RunPulse RestPulse
MaxPulse / selectionbackward
run
3
PROC REG model selections
The nine methods of model selection implemented
in PROC REG are specified with the SELECTION
option in the MODEL statement
4
Model-selection Methods in PROC REG
  • The nine methods of model selection implemented
    in PROC REG are
  • NONE
  • FORWARD (forward selection)
  • This method starts with no variables in the
    model and adds variables one by one to the model.
    At each step, the variable added is the one that
    maximizes the fit of the model. You can also
    specify groups of variables to treat as a unit
    during the selection process. An option enables
    you to specify the criterion for inclusion.

5
Model-selection Methods in PROC REG
  • BACKWARD (backward elimination.)
  • This method starts with a full model and
    eliminates variables one by one from the model.
    At each step, the variable with the smallest
    contribution to the model is deleted. You can
    also specify groups of variables to treat as a
    unit during the selection process. An option
    enables you to specify the criterion for
    exclusion.

6
Model-selection Methods in PROC REG
  • STEPWISE
  • MAXR
  • MINR
  • RSQUARE
  • CP
  • ADJRSQ

7
Forward Selection in PROC REG
  • The forward-selection technique begins with no
    variables in the model.
  • For each of the independent variables, the
    FORWARD method calculates F statistics that
    reflect the variable's contribution to the model
    if it is included.
  • The p-values for these F statistics are compared
    to the SLENTRY value that is specified in the
    MODEL statement (or to 0.50 if the SLENTRY
    option is omitted).
  • If no F statistic has a significance level
    greater than the SLENTRY value, the FORWARD
    selection stops.

8
Forward Selection in PROC REG
  • Otherwise, the FORWARD method adds the variable
    that has the largest F statistic to the model.
  • The FORWARD method then calculates F statistics
    again for the variables still remaining outside
    the model, and the evaluation process is
    repeated.
  • Thus, variables are added one by one to the model
    until no remaining variable produces a
    significant F statistic.
  • Once a variable is in the model, it stays.

9
Backward Elimination in PROC REG
  • The backward elimination technique begins by
    calculating F statistics for a model, including
    all of the independent variables.
  • Then the variables are deleted from the model one
    by one until all the variables remaining in the
    model produce F statistics significant at the
    SLSTAY level specified in the MODEL statement
    (or at the 0.10 level if the SLSTAY option is
    omitted).
  • At each step, the variable showing the smallest
    contribution to the model is deleted.

10
Stepwisein PROC REG
  • The stepwise method is a modification of the
    forward-selection technique and differs in that
    variables already in the model do not necessarily
    stay there.
  • As in the forward-selection method, variables are
    added one by one to the model, and the F
    statistic for a variable to be added must be
    significant at the SLENTRY level.
  • After a variable is added, however, the stepwise
    method looks at all the variables already
    included in the model and deletes any variable
    that does not produce an F statistic significant
    at the SLSTAY level.

11
Stepwisein PROC REG
  • Only after this check is made and the necessary
    deletions accomplished can another variable be
    added to the model.
  • The stepwise process ends when none of the
    variables outside the model has an F statistic
    significant at the SLENTRY level and every
    variable in the model is significant at the
    SLSTAY level, or when the variable to be added
    to the model is the one just deleted from it.

12
Regression in PROC GLM
  • Unlike PROC REG, PROC GLM allows polynomial terms
    or interaction terms in the MODEL statement.
  • e.g. xx, x1x2, etc
  • MODEL option SOLUTION
  • produces a solution to the normal equations
    (parameter estimates). PROC GLM displays a
    solution by default when your model involves no
    classification variables, so you need this option
    only if you want to see the solution for models
    with classification effects.

13
Example
  • data mileage
  • input mph mpg _at__at_
  • datalines
  • 20 15.4
  • 30 20.2
  • 40 25.7
  • 50 26.2 50 26.6 50 27.4
  • 55 .
  • 60 24.8

14
Example
  • proc glm
  • model mpgmph mphmph / p clm
  • output outpp pmpgpred rresid
  • axis1 minornone major(number5)
  • axis2 minornone major(number8)
  • symbol1 cblack inone vplus
  • symbol2 cblack ispline vnone
  • proc gplot datapp
  • plot mpgmph1 mpgpredmph2 /
  • overlay haxisaxis1 vaxisaxis2
  • run

15
Assignment
  • Read in lowbwt.xls
  • Find a good model for HEADCIRC
  • Model section (forward and backward) play with
    SLSTAY SLENTRY in PROC REG
  • Check interaction between MOMAGE and TOX
Write a Comment
User Comments (0)
About PowerShow.com