Poisson Models

Example: Poisson Model

To create this example:
  1. Create the Work.Long97Data data set. For more information, see LONG97DATA Data Set.
  2. In the Tasks section, expand the Econometrics folder, and then double-click Panel Data Models. The user interface for the Panel Data Models task opens.
  3. On the Data tab, select the WORK.LONG97DATA data set.
    Tip
    If the data set is not available from the drop-down list, click Select a table icon. 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.
  4. Assign columns to these roles:
    Role
    Column Name
    Panel Structure
    Cross-sectional ID
    fem
    Roles
    Dependent variable
    art
    Continuous variables
    ment
    phd
    Categorical variable
    kid5
  5. On the Model tab, select Poisson as the model type.
  6. To run the task, click Submit SAS Code Icon.
Here are the results:
Class Level Information, Model Fit Summary, and Parameter Estimates

Assigning Data to Roles

To perform a Poisson model analysis, you must assign an input data set. To filter the input data source, click Filter Icon.
You also must assign variables to the Cross-sectional ID and Dependent variable roles.
Role
Description
Panel Structure
Cross-sectional ID
specifies the cross section for each observation. The task verifies that the input data is sorted by the cross-sectional ID.
Time ID
specifies the time period for each observation. For each cross section, the values of the time ID must be unique.
Note: For the Poisson model, a time ID is not required and is ignored in the analysis.
Roles
Dependent variable
specifies the numeric column that contains the count values. In the input data set, this variable must contain only nonnegative integer values.
Continuous variables
specifies the independent covariates (regressors) for the regression model. If you do not specify a continuous variable, the task fits a model that contains only an intercept.
Categorical variables
specifies the classification variables. The task generates dummy variables for each level of the categorical variable.
Additional Roles
Group analysis by
enables you to obtain separate analyses of observations for each unique group.

Setting the Model Options

To create a Poisson model:
  1. From the Model type drop-down list, select Poisson.
  2. Specify the model effects.
    You can display the main effects model or create a custom model. To create a custom model, select the Custom Model option, and then click Edit. The Model Effects Builder opens. All continuous variables and categorical variables are listed in the Variables pane.
    • To create a main effect, select the variable in the Variables pane, and then click Add.
    • To create a crossed effect, select the variables in the Variables pane. (You can use Ctrl to select multiple variables.) Then click Cross.
    When you finish, click OK. The effects that you specified now appear on the Model tab.
    Here is an example of model effects on the Model tab.
    price and price*productLine effects
  3. Specify the error component to include in the model. The error component can be for fixed effects or random effects.

Setting the Options

Option Name
Description
Methods
Note: The covariance matrix estimator is the inverse Hessian matrix.
Optimization
Method
specifies the optimization method to use.
Maximum number of iterations
specifies the maximum number of iterations in the optimization process. You can use the default value, or you can specify a custom value.
Statistics
Select the statistics to display in the results.
Here are the additional statistics that you can include in the results:
  • correlations of the parameter estimates
  • covariances of the parameter estimates
  • iteration history of the objective function and parameter estimates

Creating the Output Data Sets

You can create these output data sets:
  • an output data set that contains the default statistics from the analysis and additional statistics, such as predicted values, the probability of the dependent variable taking the current value, and the linear predictor
  • a parameter estimates data set