A generalized linear
model (GLM) is an extension of a traditional linear model that allows
the population mean to depend on a linear predictor through a nonlinear
link function. A GLM requires that you specify a distribution and
a link function. The distribution should match the distribution of
the response variable. The link function is used to relate the response
variable to the effect variables.
To create the GLM for
this example, complete the following steps:
-
In the
Data pane,
select the variable
Emission of Total Hydrocarbons (g/mi).
Click
, and select
Measure Details.
-
In the
Measure
Details window, notice that the distribution of emissions
of total hydrocarbons (g/mi) is not normal. The shape of the distribution
suggests that an exponential distribution might be appropriate for
the GLM.
Close the Measure
Details window.
-
Click
to create a new visualization.
-
Click
to specify that this visualization is a GLM. Maximize
the visualization.
-
Drag and drop the variable
Emission
of Total Hydrocarbons (g/mi) into the
Response field
on the
Roles tab.
-
Select the
Properties tab
in the right pane. Select
Informative missingness.
-
For the
Distribution property,
select
Exponential.
-
Drag and drop the variables
Vehicle
Clusters,
Vehicle Manufacturer,
Vehicle
Axle Ratio,
Vehicle Cylinders,
Vehicle
Gears,
Vehicle MPG, and
Vehicle
Weight (lbs) onto the visualization. SAS Visual Analytics
automatically creates a GLM using these variables as the effects.
-
Drag and drop the variable
Vehicle
Type into the
Group By field
on the
Roles tab. This specifies that
Vehicle
Type is used as a segmentation variable.
The results windows
are updated. As with the linear regression, separate models are created
based on a vehicle’s classification as a car, a truck, or both.
-