Regression Action Set
The genmod Action
- 20.1 Poisson Regression
Poisson Regression
This section contains PROC CAS code.
Note: Input data must be accessible in your CAS session, either as a CAS table or as a transient-scope table. A CAS table has a two-level name: the first level is your CAS engine libref, and the second level is the table name. You refer to this table in the CAS procedure by specifying only the second level. For more information about two-level names, see Chapter 2, Shared Concepts. A transient-scope table is called directly from the action and exists in memory for the duration of the action. For more information about accessing data, see SAS Viya: System Programming Guide. For more information about PROC CAS and programming in CASL, see SAS Cloud Analytic Services: CASL Programmer’s Guide and SAS Cloud Analytic Services: CASL Reference.
The following DATA step creates the data table mycas.getStarted in your CAS session. This data table consists of 100 observations on a count response variable (Y); and five categorical variables (C1–C5), each of which has four numerical levels. These statements assume that your CAS engine libref is named mycas, but you can substitute any appropriately defined CAS engine libref.
data mycas.getStarted;
input C1-C5 Y @@;
datalines;
0 3 1 1 3 2 2 3 0 3 1 2 1 3 2 2 2 1 1 2 0 0 3 2 0 2 1 0 1 1
0 2 1 0 2 1 1 2 1 0 1 0 0 2 1 1 2 1 1 2 0 0 1 0 0 1 1 3 3 2
2 2 2 2 1 1 0 3 2 0 3 2 2 2 2 0 0 1 0 2 0 2 0 1 1 3 0 0 0 0
1 2 1 2 3 2 0 1 2 3 1 1 1 1 0 0 1 0 1 3 2 2 2 0 2 1 3 1 1 2
1 3 0 1 2 1 2 0 2 3 0 5 2 2 2 1 0 1 3 1 3 1 0 1 3 1 3 1 2 3
3 1 1 2 3 7 3 1 1 1 0 1 3 1 0 0 0 2 3 1 2 3 0 1 2 2 0 1 2 1
3 3 2 2 3 1 2 0 0 2 3 2 1 0 0 2 3 4 0 0 2 3 0 6 0 3 1 0 0 0
3 0 1 0 1 1 2 0 0 0 3 2 1 0 1 0 3 2 1 1 3 1 1 1 2 1 3 0 3 7
1 3 2 1 1 0 2 1 0 0 1 0 0 0 1 1 2 3 0 1 0 1 0 2 1 2 2 2 3 1
0 3 2 3 1 1 3 3 0 3 3 1 2 0 0 2 1 2 2 2 3 0 3 3 0 2 0 3 0 1
3 0 1 2 2 2 2 1 2 3 1 0 3 2 0 3 1 0 3 0 3 0 0 2 1 3 2 2 1 3
2 3 2 0 3 1 1 0 1 2 1 1 2 1 2 2 2 5 3 0 1 1 2 5 0 1 1 3 2 1
2 2 1 3 1 4 1 1 0 0 1 1 3 3 1 2 1 2 2 2 0 2 3 3 0 1 0 0 2 2
0 1 2 0 1 2 3 2 2 2 0 1 2 2 3 0 0 1 1 2 2 3 2 1 3 3 2 2 1 2
0 0 3 1 3 6 3 2 3 1 2 3 0 3 0 0 0 1 3 3 3 0 3 2 2 3 2 0 2 0
1 3 0 2 0 1 1 3 1 0 2 0 3 2 3 3 0 1 3 1 0 2 0 4 0 1 2 2 1 1
0 2 3 2 2 1 0 3 2 0 1 3 2 1 1 2 0 1 1 0 3 0 0 0 0 0 3 2 0 1
0 2 3 1 0 0 2 2 2 1 3 2 3 3 3 0 0 0 2 2 1 3 3 2 0 2 3 2 3 2
1 3 1 2 1 0 3 0 1 1 1 4 2 1 1 1 3 6 0 2 0 3 2 1 2 0 1 1 2 2
2 2 2 2 3 2 1 0 2 2 1 3 1 3 3 1 1 1 3 1 2 1 3 5 0 3 2 1 2 0
;
The following PROC CAS statements use the genmod action in the regression action set to fit a log-linked Poisson model to these data. The table parameter names the input data table. The class parameter specifies that the variables C1, C2, C3, C4, and C5 are classification (nominal) variables; this parameter corresponds to the CLASS statement in the GENSELECT procedure. The model parameter specifies the model: the depvar subparameter specifies the variable y as the response (target) variable; the effects subparameter lists the five classification variables, C1–C5; the dist subparameter specifies that the response variable y has a Poisson distribution; and the link subparameter specifies a log link between the mean and the linear predictor. The itHist subparameter in the optimization parameter list produces a table that summarizes the steps of the optimization. Finally, the outputTables parameter outputs the fitted parameter estimates to the mycas.pe data table.
proc cas;
regression.genmod
table={name='getStarted'},
class={'C1','C2','C3','C4','C5'},
model={depvar='y',
effects={'C1', 'C2', 'C3', 'C4', 'C5'},
dist='poisson',
link='log'},
optimization={itHist='summary'},
outputTables={names={parameterestimates='pe'}};
run;
The output from this analysis is displayed by default, and is presented in Output 20.1.1 through Output 20.1.7.
Output 20.1.1 displays the "Model Information" table. The variable Y is an integer-valued variable that is modeled by using a Poisson probability distribution, and the mean of Y is modeled by using a log link function. The genmod action uses a Newton-Raphson algorithm to fit the model. The classification variables C1–C5 are parameterized by using GLM parameterization, which is the default.
Output 20.1.1: Model Information
| Model Information | |
|---|---|
| Data Source | GETSTARTED |
| Response Variable | Y |
| Distribution | Poisson |
| Link Function | Log |
| Optimization Technique | Newton-Raphson with Ridging |
Each of the classification variables C1–C5 has four unique formatted levels, which are displayed in the "Class Level Information" table in Output 20.1.2.
Output 20.1.2: Class Level Information
| Class Level Information | ||
|---|---|---|
| Class | Levels | Values |
| C1 | 4 | 0 1 2 3 |
| C2 | 4 | 0 1 2 3 |
| C3 | 4 | 0 1 2 3 |
| C4 | 4 | 0 1 2 3 |
| C5 | 4 | 0 1 2 3 |
Output 20.1.3 displays the "Number of Observations" table. All 100 observations in the data set are used in the analysis.
Output 20.1.3: Number of Observations
| Number of Observations Read | 100 |
|---|---|
| Number of Observations Used | 100 |
Output 20.1.4 displays the "Dimensions" table for this model. This table summarizes some important sizes of various model components. For example, it shows that the design matrix has 21 columns: 1 column for the intercept and 20 columns for the effects that are associated with the classification variables
C1–C5. However, the rank of the crossproducts matrix is only 16. Because the classification variables C1–C5 use GLM parameterization and because the model contains an intercept, there is one singularity in the crossproducts matrix of the model for each classification variable. Consequently, only 16 parameters enter the optimization.
Output 20.1.4: Dimensions in Poisson Regression
| Dimensions | |
|---|---|
| Columns in Design | 21 |
| Number of Effects | 6 |
| Max Effect Columns | 4 |
| Rank of Design | 16 |
| Parameters in Optimization | 16 |
Output 20.1.5 displays the final convergence status of the Newton-Raphson algorithm. The FCONV convergence criterion is satisfied.
Output 20.1.5: Convergence Status
| Convergence criterion (FCONV=1E-7) satisfied. |
The "Fit Statistics" table is shown in Output 20.1.6. The –2 log likelihood at the converged estimates is 290.16169. You can use this value to compare the model to nested model alternatives by means of a likelihood ratio test. To compare models that are not nested, information criteria such as AIC (Akaike’s information criterion), AICC (Akaike’s bias-corrected information criterion), and BIC (Schwarz Bayesian information criterion) are used. These criteria penalize the –2 log likelihood for the number of parameters.
Output 20.1.6: Fit Statistics
| Fit Statistics | |
|---|---|
| -2 Log Likelihood | 290.16169 |
| AIC (smaller is better) | 322.16169 |
| AICC (smaller is better) | 328.71590 |
| SBC (smaller is better) | 363.84441 |
The "Parameter Estimates" table in Output 20.1.7 shows that many parameters have fairly large p-values, indicating that one or more of the model effects might not be necessary.
Output 20.1.7: Parameter Estimates
| Parameter Estimates | |||||
|---|---|---|---|---|---|
| Parameter | DF | Estimate | Standard Error | Chi-Square | Pr > ChiSq |
| Intercept | 1 | 0.881904 | 0.382730 | 5.3095 | 0.0212 |
| C1 0 | 1 | -0.196002 | 0.211482 | 0.8590 | 0.3540 |
| C1 1 | 1 | -0.605161 | 0.263508 | 5.2742 | 0.0216 |
| C1 2 | 1 | -0.068458 | 0.210776 | 0.1055 | 0.7453 |
| C1 3 | 0 | 0 | . | . | . |
| C2 0 | 1 | 0.961117 | 0.255485 | 14.1521 | 0.0002 |
| C2 1 | 1 | 0.708188 | 0.246768 | 8.2360 | 0.0041 |
| C2 2 | 1 | 0.161741 | 0.266365 | 0.3687 | 0.5437 |
| C2 3 | 0 | 0 | . | . | . |
| C3 0 | 1 | -0.227016 | 0.252561 | 0.8079 | 0.3687 |
| C3 1 | 1 | -0.094775 | 0.229519 | 0.1705 | 0.6797 |
| C3 2 | 1 | 0.044801 | 0.238127 | 0.0354 | 0.8508 |
| C3 3 | 0 | 0 | . | . | . |
| C4 0 | 1 | -0.280476 | 0.263589 | 1.1322 | 0.2873 |
| C4 1 | 1 | 0.028157 | 0.249652 | 0.0127 | 0.9102 |
| C4 2 | 1 | 0.047803 | 0.240378 | 0.0395 | 0.8424 |
| C4 3 | 0 | 0 | . | . | . |
| C5 0 | 1 | -0.817936 | 0.219901 | 13.8351 | 0.0002 |
| C5 1 | 1 | -0.710595 | 0.206265 | 11.8684 | 0.0006 |
| C5 2 | 1 | -0.602080 | 0.217724 | 7.6471 | 0.0057 |
| C5 3 | 0 | 0 | . | . | . |
Finally, the procedure displays the table in Output 20.1.8, which shows the amount of time (in seconds) that the genmod action spent performing different tasks in the analysis.
Output 20.1.8: Procedure Timing
| Task Timing | ||
|---|---|---|
| Task | Seconds | Percent |
| Setup and Parsing | 0.02 | 31.04% |
| Levelization | 0.01 | 16.88% |
| Model Initialization | 0.00 | 6.13% |
| SSCP Computation | 0.01 | 9.40% |
| Model Fitting | 0.02 | 35.15% |
| Cleanup | 0.00 | 0.01% |
| Total | 0.07 | 100.00% |
Output 20.1.7 shows that the full model might have several nonsignificant effects. You can perform forward selection on these data by using the following statements. Effects that provide the best improvement for the default selection criterion, the Schwarz Bayesian information criterion (SBC), are added until no more effects can improve the selection criterion. The method subparameter in the selection parameter enables you to choose the selection method, and the details subparameter produces all tables that are related to model selection. The ODS TRACE command displays the full name paths of the output tables in the SAS log.
ods trace on;
proc cas;
regression.genmod
table={name='GETSTARTED'},
class={'C1', 'C2', 'C3', 'C4', 'C5'},
model={depvar='Y',
effects={'C1', 'C2','C3', 'C4', 'C5'},
dist='poisson',
link='log'},
selection={method='FORWARD', details='ALL'};
run;
The model selection tables are shown in Output 20.1.9 through Output 20.1.11. Results from the selected model are shown in Output 20.1.12 and Output 20.1.13.
The "Selection Information" table in Output 20.1.9 summarizes the settings for the model selection. At each step, an effect is added to the model only if it produces the most significant improvement in the SBC. The forward selection stops three steps after the smallest SBC is obtained, or when all effects have been added to the model.
Output 20.1.9: Selection Information
| Selection Information | |
|---|---|
| Selection Method | Forward |
| Select Criterion | SBC |
| Stop Criterion | SBC |
| Effect Hierarchy Enforced | None |
| Stop Horizon | 3 |
For each step of the selection process, the details=all subparameter displays the effects that are candidates for entering the model along with their selection criterion (SBC). Output 20.1.10 displays this table for the first step; the other steps are not shown here.
Output 20.1.10: Step1 Entry Candidates
| Entry Candidates | ||
|---|---|---|
| Rank | Effect | SBC |
| 1 | C2 | 342.8795 |
| 2 | C5 | 347.5376 |
| 3 | C1 | 355.7067 |
| 4 | C4 | 361.7379 |
| 5 | C3 | 365.7339 |
The details=all subparameter also displays the dimensions, fit statistics, and parameter estimates at each step of the selection process; these details are not shown here.
When the selection procedure is complete, the "Selection Summary" table in Output 20.1.11 shows the effects that were added to the model and the value of their selection criterion (and the choose and stop criteria, if they are specified). Step 0 refers to the model that contains only an intercept. In step 1, effect C2 made the most significant contribution to the model among the candidate effects, according to the SBC statistic. In step 2, C5 made the most significant contribution when an effect was added to a model that contains the intercept and C2. In the three subsequent steps, no effect could be added to the model that would reduce the SBC, so variable selection stopped because the stop horizon indicates that at most three steps beyond the minimum SBC value are to be taken.
In Output 20.1.11, the "Selection Summary" table is followed by three small tables that summarize why the process stopped and which model is selected.
Output 20.1.11: Selection Summary Information
| Selection Summary | |||
|---|---|---|---|
| Step | Effect Entered | Number Effects In | SBC |
| 0 | Intercept | 1 | 354.7980 |
| 1 | C2 | 2 | 342.8795 |
| 2 | C5 | 3 | 333.8182* |
| 3 | C1 | 4 | 341.7993 |
| 4 | C4 | 5 | 351.8375 |
| 5 | C3 | 6 | 363.8674 |
| * Optimal Value Of Criterion | |||
| Selection stopped at a local minimum of the STOP criterion. |
| The model at step 2 is selected. |
| Selected Effects: | Intercept C2 C5 |
|---|
Output 20.1.12 displays information about the selected model. Notice that the –2 log-likelihood value in the "Fit Statistics" table is larger than the value for the full model in Output 20.1.6. This is expected because the selected model contains only a subset of the parameters. Because the selected model is more parsimonious than the full model, the discrepancy between the –2 log likelihood and the information criteria is less severe than previously noted.
Output 20.1.12: Fit Statistics
| Dimensions | |
|---|---|
| Columns in Design | 9 |
| Number of Effects | 3 |
| Max Effect Columns | 4 |
| Rank of Design | 7 |
| Parameters in Optimization | 7 |
| Fit Statistics | |
|---|---|
| -2 Log Likelihood | 303.58036 |
| AIC (smaller is better) | 317.58036 |
| AICC (smaller is better) | 318.79775 |
| SBC (smaller is better) | 335.81655 |
The parameter estimates of the selected model are shown in Output 20.1.13. Notice that the effects are listed in the "Parameter Estimates" table in the order in which they were specified in the model parameter and not in the order in which they were added to the model.
Output 20.1.13: Parameter Estimates
| Parameter Estimates | |||||
|---|---|---|---|---|---|
| Parameter | DF | Estimate | Standard Error | Chi-Square | Pr > ChiSq |
| Intercept | 1 | 0.528024 | 0.215231 | 6.0186 | 0.0142 |
| C2 0 | 1 | 0.962636 | 0.236921 | 16.5088 | <.0001 |
| C2 1 | 1 | 0.845132 | 0.233634 | 13.0851 | 0.0003 |
| C2 2 | 1 | 0.213247 | 0.248896 | 0.7341 | 0.3916 |
| C2 3 | 0 | 0 | . | . | . |
| C5 0 | 1 | -0.763491 | 0.207082 | 13.5933 | 0.0002 |
| C5 1 | 1 | -0.785915 | 0.201271 | 15.2471 | <.0001 |
| C5 2 | 1 | -0.541212 | 0.208661 | 6.7275 | 0.0095 |
| C5 3 | 0 | 0 | . | . | . |
Poisson Regression
This section contains Lua code for the analysis in the CASL version of this example, which contains details about the results.
Note: In order to run this code, the data that are described in the CASL version need to be accessible to the CAS server. One way to do this is to convert the getStarted data to the comma-separated-value (CSV) file getStarted.csv and then use the following code to load the CSV file into CAS:
s:loadtable{casLib="casuser", path="getStarted.csv"}
For more information about coding in Lua, see Getting Started with SAS Viya for Lua and SAS Viya: System Programming Guide.
The following code loads the regression action set and then uses the genmod action in the regression action set to fit a log-linked Poisson model to the getStarted data table. The table parameter names the input data table. The class parameter specifies that the variables C1, C2, C3, C4, and C5 are classification (nominal) variables; this parameter corresponds to the CLASS statement in the GENSELECT procedure. The model parameter specifies the model: the depvar subparameter specifies the variable y as the response (target) variable; the effects subparameter lists the five classification variables, C1–C5; the dist subparameter specifies that the response variable y has a Poisson distribution; and the link subparameter specifies a log link between the mean and the linear predictor. The itHist subparameter in the optimization parameter list produces a table that summarizes the steps of the optimization. Finally, the outputTables parameter outputs the fitted parameter estimates to the pe data table.
s:loadactionset{actionset='regression'}
m=s:genmod{table={name='getStarted'},
class={'C1','C2','C3','C4','C5'},
model={depvar='y',
effects={'C1', 'C2', 'C3', 'C4', 'C5'},
dist='poisson',
link='log'},
optimization={itHist='summary'},
outputTables={names={parameterestimates='pe'}} }
The following commands display the tables that are produced by this action call:
print(m.ModelInfo)
print(m.NObs)
print(m.ClassInfo)
print(m.IterHistory)
print(m.ConvergenceStatus)
print(m.Dimensions)
print(m.FitStatistics)
print(m.ParameterEstimates)
print(m.Timing)
The full model has several nonsignificant effects; for details about the results of this analysis, see the CASL version of this example. You can perform forward selection on these data by using the following statements. Effects that provide the best improvement to the default selection criterion, the Schwarz Bayesian information criterion (SBC), are added until no more effects can improve the selection criterion. In the following program, the method subparameter in the selection parameter enables you to choose the selection method, and the details subparameter produces all tables that are related to model selection.
m=s:genmod{table={name='getStarted'},
class={'C1','C2','C3','C4','C5'},
model={depvar='y',
effects={'C1', 'C2', 'C3', 'C4', 'C5'},
dist='poisson',
link='log'},
optimization={itHist='summary'},
selection={method='forward', details='all'}}
The following commands display some of the tables that are produced by this action call:
print(m.SelectionInfo)
print(m["StepDetails.Step1.EntryCandidates"])
print(m["Summary.SelectionSummary"])
print(m["Summary.StopReason"])
print(m["Summary.SelectionReason"])
print(m["Summary.SelectedEffects"])
print(m["SelectedModel.Dimensions"])
print(m["SelectedModel.FitStatistics"])
print(m["SelectedModel.ParameterEstimates"])
The following command displays all the tables that are produced by this action call along with their full name paths:
for k,t in pairs(m) do print(k) print(t) end
For details about the results of this analysis, see the CASL version of this example.
Poisson Regression
This section contains Python code for the analysis in the CASL version of this example, which contains details about the results.
Note: In order to run this code, the data that are described in the CASL version need to be accessible to the CAS server. One way to do this is to convert the getStarted data to the comma-separated-value (CSV) file getStarted.csv and then use the following code to load the CSV file into CAS:
s.upload_file('getStarted.csv')
For more information about coding in Python, see Getting Started with SAS Viya for Python and SAS Viya: System Programming Guide.
The following code loads the regression action set and then uses the genmod action in the regression action set to fit a log-linked Poisson model to the getStarted data table. The table parameter names the input data table. The class parameter specifies that the variables C1, C2, C3, C4, and C5 are classification (nominal) variables; this parameter corresponds to the CLASS statement in the GENSELECT procedure. The model parameter specifies the model: the depvar subparameter specifies the variable y as the response (target) variable; the effects subparameter lists the five classification variables, C1–C5; the dist subparameter specifies that the response variable y has a Poisson distribution; and the link subparameter specifies a log link between the mean and the linear predictor. The itHist subparameter in the optimization parameter list produces a table that summarizes the steps of the optimization. Finally, the outputTables parameter outputs the fitted parameter estimates to the pe data table.
s.loadactionset(actionset='regression')
m=s.genmod(
table='getStarted',
classVars={'C1','C2','C3','C4','C5'},
model={'depvar':'y',
'effects':['C1', 'C2', 'C3', 'C4', 'C5'],
'dist':'poisson',
'link':'log'},
optimization={'itHist':'summary'},
outputTables={'names':{'parameterestimates':'pe'}} )
The following commands display the tables that are produced by this call:
print(m.ModelInfo)
print(m.NObs)
print(m.ClassInfo)
print(m.IterHistory)
print(m.ConvergenceStatus)
print(m.Dimensions)
print(m.FitStatistics)
print(m.ParameterEstimates)
print(m.Timing)
The full model has several nonsignificant effects; for details about the results of this analysis, see the CASL version of this example. You can perform forward selection on these data by using the following statements. Effects that provide the best improvement for the default selection criterion, the Schwarz Bayesian information criterion (SBC), are added until no more effects can improve the selection criterion. The method subparameter in the selection parameter enables you to choose the selection method, and the details subparameter produces all tables that are related to model selection.
m=s.genmod(
table='getStarted',
classVars={'C1','C2','C3','C4','C5'},
model={'depvar':'y',
'effects':['C1', 'C2', 'C3', 'C4', 'C5'],
'dist':'poisson',
'link':'log'},
optimization={'itHist':'summary'},
selection={'method':'forward', 'details':'all'})
The following commands display some of the tables that are produced by this action call:
print(m.SelectionInfo)
print(m["StepDetails.Step1.EntryCandidates"])
print(m["Summary.SelectionSummary"])
print(m["Summary.StopReason"])
print(m["Summary.SelectionReason"])
print(m["Summary.SelectedEffects"])
print(m["SelectedModel.Dimensions"])
print(m["SelectedModel.FitStatistics"])
print(m["SelectedModel.ParameterEstimates"])
The following command displays all the tables that are produced by this action call along with their full name paths:
print(m)
For details about the results of this analysis, see the CASL version of this example.
Poisson Regression
This section contains R code for the analysis in the CASL version of this example, which contains details about the results.
Note: In order to run this code, the data that are described in the CASL version need to be accessible to the CAS server. One way to do this is to convert the getStarted data to the comma-separated-value (CSV) file getStarted.csv and then use the following code to load the CSV file into CAS:
m <- cas.read.csv(s, "getStarted.csv", casOut=list(name="getStarted"))
For more information about coding in R, see Getting Started with SAS Viya for R and SAS Viya: System Programming Guide.
The following code loads the regression action set and then uses the genmod action in the regression action set to fit a log-linked Poisson model to the getStarted data table. The table parameter names the input data table. The class parameter specifies that the variables C1, C2, C3, C4, and C5 are classification (nominal) variables; this parameter corresponds to the CLASS statement in the GENSELECT procedure. The model parameter specifies the model: the depvar subparameter specifies the variable y as the response (target) variable; the effects subparameter lists the five classification variables, C1–C5; the dist subparameter specifies that the response variable y has a Poisson distribution; and the link subparameter specifies a log link between the mean and the linear predictor. The itHist subparameter in the optimization parameter list produces a table that summarizes the steps of the optimization. Finally, the outputTables parameter outputs the fitted parameter estimates to the pe data table.
m <- cas.builtins.loadActionSet(s, actionset='regression')
m <- cas.regression.genmod(s,
table='getStarted',
class=list('C1','C2','C3','C4','C5'),
model=list(depvar='y',
effects=list('C1', 'C2', 'C3', 'C4', 'C5'),
dist='poisson',
link='log'),
optimization=list(itHist='summary'),
outputTables=list(names=list(parameterestimates='pe'))
)
The following commands display the tables that are produced by this action call:
print(m$ModelInfo)
print(m$NObs)
print(m$ClassInfo)
print(m$IterHistory)
print(m$ConvergenceStatus)
print(m$Dimensions)
print(m$FitStatistics)
print(m$ParameterEstimates)
print(m$Timing)
The full model has several nonsignificant effects; for details about the results of this analysis, see the CASL version of this example. You can perform forward selection on these data by using the following statements. Effects that provide the best improvement to the default selection criterion, the Schwarz Bayesian information criterion (SBC), are added until no more effects can improve the selection criterion. In the following program, the method subparameter in the selection parameter enables you to choose the selection method, and the details subparameter produces all tables that are related to model selection.
m <- cas.regression.genmod(s,
table='getStarted',
class=list('C1','C2','C3','C4','C5'),
model=list(depvar='y',
effects=list('C1', 'C2', 'C3', 'C4', 'C5'),
dist='poisson',
link='log'),
optimization=list(itHist='summary'),
selection=list(method='forward', details='all')
)
The following commands display some of the tables that are produced by this action call:
print(m$SelectionInfo)
print(m$StepDetails.Step1.EntryCandidates)
print(m$Summary.SelectionSummary)
print(m$Summary.StopReason)
print(m$Summary.SelectionReason)
print(m$Summary.SelectedEffects)
print(m$SelectedModel.Dimensions)
print(m$SelectedModel.FitStatistics)
print(m$SelectedModel.ParameterEstimates)
The following command displays all the tables that are produced by this action call along with their full name paths:
print(m)
For details about the results of this analysis, see the CASL version of this example.