In this example, you
want to use regression analysis to find out how well you can predict
a child's weight if you know the child's height.
To create this example:
-
In the
Tasks section,
expand the
Statistics folder, and then double-click
Linear
Regression. The user interface for the Linear Regression
task opens.
-
On the
Data tab,
select the
SASHELP.CLASS data set.
Tip
If the data set is
not available from the drop-down list, click
. In the
Choose a Table window,
expand the library that contains the data set that you want to use.
Select the data set for the example and click
OK.
The selected data set should now appear in the drop-down list.
-
Assign columns to these
roles:
Role
|
Column Name
|
Dependent
variable
|
Weight
|
Classification
variables
|
Sex
|
Continuous
variables
|
Age
Height
|
-
On the
Model tab,
click
and create these models:
-
Select the
Height variable,
and then press Ctrl and select the
Age variable.
Click
Add.
-
Select the
Height variable,
and then press Ctrl and select the
Sex variable.
Click
Cross.
Click OK.
-
To run the task, click
.