Many SAS/STAT® modeling procedures provide one or more of the following tools for restricting model parameters. Each one can restrict one or more parameters. Be sure to check the procedure documentation to verify the availability of these tools in your release of SAS®.
Constraints on model parameters can be of these types:
The OFFSET= option and the combination of the INEST= and MAXITER=0 options can be used to set equality constraints. The BOUNDS statement enables you to place minimum and/or maximum bounds on parameter values. The RESTRICT statement can specify equality, inequality, or order constraints, depending on the procedure.
The RESTRICT Statement
Several SAS/STAT procedures, such as REG, HPGENSELECT, FMM, HPFMM, HPNLMOD, CATMOD, and BCHOICE, offer a RESTRICT statement. The following table summarizes the types of constraints provided by the RESTRICT statement in each procedure. See the procedure documentation for your release of SAS for a description and examples of the proper syntax for making restrictions.
Constraints | |||
---|---|---|---|
Procedure | Equality | Inequality | Order |
REG | ✔ | ||
CATMOD | ✔ | ||
HPGENSELECT | ✔ | ✔ | ✔ |
FMM | ✔ | ✔ | ✔ |
HPFMM | ✔ | ✔ | ✔ |
HPNLMOD | ✔ | ✔ | ✔ |
BCHOICE | ✔ | ✔ |
The following statements show how the RESTRICT statement can be used to impose order constraints on the model parameters. Suppose that CLASS variable A has four levels and therefore three degrees of freedom and three parameters to estimate. The first RESTRICT statement restricts the first A parameter, β1, to be larger than the second, β2. The second RESTRICT statement restricts β2 to be larger than the third parameter, β3. Together, they impose the order restriction β1 > β2 > β3.
proc hpgenselect; class a; model y=a; restrict a 1 -1 > 0; restrict a 0 1 -1 > 0; run;
Similarly, the RESTRICT statement can impose order constraints in a multinomial model. Suppose the response, Y, has three levels defining two generalized logits. Then the continuous predictor, X, has a parameter on each of these two logits. These statements constrain the X parameter in the first logit to be less than the X parameter in the second logit.
proc hpgenselect; model y=x / dist=mult link=glogit; restrict x 1, x -1 < 0; run;
The BOUNDS Statement
A BOUNDS statement is available in several SAS/STAT procedures including NLMIXED, HPNLMOD, NLIN, and CALIS. Use this statement to specify inequality (and/or equality in CALIS only) constraints on one or more model parameters. See the procedure documentation for your release of SAS for a description and examples of the proper syntax for specifying boundary constraints.
The OFFSET=variable option
An OFFSET= option is available in the MODEL statement in many SAS/STAT procedures including ADAPTIVEREG, FMM, GAM, GAMPL, GEE, GENMOD, GLIMMIX, HPFMM, HPGENSELECT, HPLOGISTIC, ICPHREG, LIFEREG, LOGISTIC, PHREG, and SURVEYLOGISTIC.
An offset is a predictor whose parameter is restricted to equal 1. While only a single predictor name can be specified in the OFFSET= option, you can use the option to restrict the parameter of more than one predictor. Additionally, each predictor to be restricted can be constrained to any desired constant. For example, suppose you want to fit a model with linear predictor
β0 + β1X1 + β2X2 + β3X3 + β4X4
and you want to constrain β1 = 2 and β2 = 3. If you define a new predictor, Z = 2X1 + 3X2, then the above linear predictor can be written as
β0 + Z + β3X3 + β4X4
Notice that Z becomes a predictor in the model with parameter equal to 1. So, removing X1 and X2 from the MODEL statement and specifying OFFSET=Z as an option accomplishes the goal of restricting β1 = 2 and β2 = 3.
The INEST=data-set or INITIAL=values option used with MAXITER=0 option
While less convenient than using the methods above, the combination of the INEST= or INITIAL= option with the MAXITER=0 option provides a way to restrict all of the model parameters to specified constants. This can be useful when you want to obtain results from a procedure using a pre-specified model. Note, however, that simply obtaining predicted values using a pre-specified model can usually be done more easily as described in this note.
Note that using the MAXITER=0 option will typically result in warning messages in the SAS log indicating that convergence was not achieved since the option prevents the procedure from iterating. By using this option you are accepting the resulting model which may not be the best fit to the data.
The INEST= option is available in several procedures including LOGISTIC, HPLOGISTIC, PHREG, LIFEREG, PROBIT, QUANTREG, ROBUSTREG, SURVEYLOGISTIC, and CALIS. The INEST= option in the PROC statement of a procedure enables you to specify a data set containing initial values for the model parameters. This data set has a particular form as described in the procedure documentation. It is easiest to first fit the unrestricted model and include the OUTEST= option in the PROC statement to save the fitted model in the proper form. You can then modify the values of this data set to contain the desired parameter values. To fit the model with parameters constrained to the initial values, specify this data set as the INEST= data set in the PROC statement and specify the MAXITER=0 option in the MODEL statement.
For example, the following statements fit the unrestricted model and save the parameter estimates using the OUTEST= option. The parameters data set is updated with the desired parameter values and then used as the INEST= data set in the second LOGISTIC step. In that step, the MAXITER=0 option forces the model to use the specified parameter values.
proc logistic data=mydata outest=parms; model y = x1 x2; run; data parms; set parms; Intercept=-2; x1=1; x2=2.5; run; proc logistic data=mydata inest=parms; model y = x1 x2 / maxiter=0; run;
Some procedures, including GENMOD, LIFEREG, and GEE, offer an INITIAL= option in the MODEL and/or REPEATED statement for specifying initial values for the predictors. An INTERCEPT= option is also available for specifying the initial value of the intercept. For example, the same restricted model as above can be specified in PROC GENMOD as follows:
proc genmod data=mydata; model y = x1 x2 / dist=bin intercept=-2 initial=1 2.5 maxiter=0; run;
Product Family | Product | System | SAS Release | |
Reported | Fixed* | |||
SAS System | SAS/STAT | All | n/a |
Type: | Usage Note |
Priority: | low |
Topic: | SAS Reference ==> Procedures ==> LOGISTIC SAS Reference ==> Procedures ==> NLMIXED SAS Reference ==> Procedures ==> FMM SAS Reference ==> Procedures ==> GENMOD Analytics ==> Regression SAS Reference ==> Procedures ==> HPGENSELECT SAS Reference ==> Procedures ==> ADAPTIVEREG SAS Reference ==> Procedures ==> BCHOICE SAS Reference ==> Procedures ==> CALIS SAS Reference ==> Procedures ==> CATMOD SAS Reference ==> Procedures ==> GAM SAS Reference ==> Procedures ==> GAMPL SAS Reference ==> Procedures ==> GEE SAS Reference ==> Procedures ==> GLIMMIX SAS Reference ==> Procedures ==> HPFMM SAS Reference ==> Procedures ==> HPLOGISTIC SAS Reference ==> Procedures ==> HPNLMOD SAS Reference ==> Procedures ==> ICPHREG SAS Reference ==> Procedures ==> LIFEREG SAS Reference ==> Procedures ==> NLIN SAS Reference ==> Procedures ==> PHREG SAS Reference ==> Procedures ==> SURVEYLOGISTIC |
Date Modified: | 2016-02-29 11:29:07 |
Date Created: | 2002-12-16 10:56:39 |