Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The NLP Procedure

Input and Output Data Sets

DATA= Input Data Set

The DATA= data set is used only to specify an objective function f, that is a combination of m other functions fi. For each function fi, i = 1, ... ,m, listed in a MAX, MIN, or LSQ statement, each observation l, l = 1, ... ,nobs, in the DATA= data set defines a specific function fil that is evaluated by substituting the values of the variables of this observation into the program statements. If the MAX or MIN statement is used, the m * nobs specific functions fil are added to a single objective function f. If the LSQ statement is used, the sum-of-squares f of the m * nobs specific functions fil is minimized. The NOMISS option causes observations with missing values to be skipped.

INEST= Input Data Set

The INEST= (or INVAR=, or ESTDATA=) input data set can be used to specify the initial values of the parameters defined in a PARMS statement as well as boundary constraints and the more general linear constraints which could be imposed on these parameters. This form of input is similar to the dense format input used in PROC LP.

The variables of the INEST= data set are

The content of the _TYPE_ variable defines the meaning of the observation of the INEST= data set. PROC NLP recognizes the following _TYPE_ values:

The constraints specified in an INEST= data set are added to the constraints specified in BOUNDS and LINCON statements. You can use an OUTEST= data set as an INEST= data set in a subsequent run of PROC NLP. However, be aware that the OUTEST= data set also contains the boundary and general linear constraints specified in the former run of PROC NLP. When you are using this OUTEST= data set without changes as an INEST= data set, PROC NLP adds the constraints from the data set to the constraints specified by a BOUNDS and LINCON statement. Although PROC NLP automatically eliminates multiple identical constraints you should avoid specifying the same constraint a second time.

INQUAD= Input Data Set

Two types of INQUAD= data sets can be used to specify the objective function of a quadratic programming problem for TECH=QUADAS or TECH=LICOMP,
f(x) = {1 \over 2} x^T G x + g^T x + c,
  {with}  G^T = G

The dense INQUAD= data set must contain all numerical values of the symmetric matrix G, vector g, and the value of the scalar c. Using the sparse INQUAD= data set allows to specify only the nonzero positions in matrix G and vector g. Those locations that are not set by the sparse INQUAD= data set are assumed to be zero.

Dense INQUAD= Data Set

A dense INQUAD= data set must contain two character variables _TYPE_ and _NAME_ and at least n numeric variables whose names are the parameter names. The _TYPE_ variable takes the following values:

Constraints specified in a dense INQUAD= data set are added to the constraints specified in BOUNDS and LINCON statements.

Sparse INQUAD= Data Set

A sparse INQUAD= data set must contain three character variables _TYPE_, _ROW_, and _COL_ and one numeric variable _VALUE_. The _TYPE_ variable can assume three values:

Using both the MODEL= option and the INCLUDE program statement with the same model file will include the file twice (erroneous in most cases).

OUT= Output Data Set

The OUT= data set contains those variables of a DATA= input data set that are referred to in the program statements and additionally variables computed by the program statements for the objective function. Specifying the NOMISS option enables you to skip observations with missing values in variables used in the program statements. The OUT= data set can also contain first- and second-order derivatives of these variables if the OUTDER= option is specified. The variables and derivatives are the final parameter estimates x* or (for TECH=NONE) the initial value x0.

The variables of the OUT= data set are:

OUTEST= Output Data Set

The OUTEST= or OUTVAR= output data set saves the optimization solutions of the use of the OUTEST= or OUTVAR= data set

The variables of the OUTEST= data set are

The _TYPE_ variable identifies how to interpret the observation. If _TYPE_ is:

If for some reason the procedure does not terminate successfully (for example, no feasible initial values can be computed or the function value or derivatives at the starting point cannot be computed), the OUTEST= data set may contain only part of the observations (usually only the PARMS and GRAD observation).

Note: Generally you can use an OUTEST= or OUTVAR= data set as an INEST= or INVAR= data set in a further run of PROC NLP. However, be aware that the OUTEST= or OUTVAR= data set also contains the boundary and general linear constraints specified in the former run of PROC NLP. When you are using this OUTEST= data set without changes as an INEST= data set, PROC NLP adds the constraints from the data set to the constraints specified by a BOUNDS or LINCON statement. Although PROC NLP automatically eliminates multiple identical constraints you should avoid specifying the same constraint a second time.

Output of Profiles

The following observations are written to the OUTEST= data set only when the PROFILE statement or CLPARM option is specified

_TYPE_ _NAME_ _RHS_ Meaning of Observation
PLC_LOWparnamey valuecoordinates of lower CL for \alpha
PLC_UPPparnamey valuecoordinates of upper CL for \alpha
WALD_CLLOWERy valuelower Wald CL for \alpha in _ALPHA_
WALD_CLUPPERy valueupper Wald CL for \alpha in _ALPHA_
PL_CLLOWERy valuelower PL CL for \alpha in _ALPHA_
PL_CLUPPERy valueupper PL CL for \alpha in _ALPHA_
PROFILEL(THETA)missingy value corresponding to x
   in following _NAME_=THETA
PROFILETHETAmissingx value corresponding to y
   in previous _NAME_=L(THETA)

Assume that the PROFILE statement specifies np parameters and n_{\alpha} confidence levels. For CLPARM, np=n and n_{\alpha}=4.

OUTMODEL= Output Data Set

The program statements for objective functions, nonlinear constraints, and derivatives can be saved into an OUTMODEL= output data set. This data set can be used in an INCLUDE program statement or as a MODEL= input data set in subsequent calls of PROC NLP. The OUTMODEL= option is similar to the option used in PROC MODEL in SAS/ETS software.

Storing Programs in Model Files

Models can be saved to and recalled from SAS catalog files. SAS catalogs are special files which can store many kinds of data structures as separate units in one SAS file. Each separate unit is called an entry, and each entry has an entry type that identifies its structure to the SAS system.

In general, to save a model, use the OUTMODEL=name option in the PROC NLP statement, where name is specified as libref.catalog.entry, libref.entry, or entry. The libref, catalog, and entry names must be valid SAS names no more than 8 characters long. The catalog name is restricted to 7 characters on the CMS operating system. If not given, the catalog name defaults to MODELS, and the libref defaults to WORK. The entry type is always MODEL. Thus, OUTMODEL=X writes the model to the file WORK.MODELS.X.MODEL.

The MODEL= option is used to read in a model. A list of model files can be specified in the MODEL= option, and a range of names with numeric suffixes can be given, as in MODEL=(MODEL1-MODEL10). When more than one model file is given, the list must be placed in parentheses, as in MODEL=(A B C), except in the case of a single name. If more than one model file is specified, the files are combined in the order listed in the MODEL= option.

When the MODEL= option is specified in the PROC NLP statement and model definition statements are also given later in the PROC NLP step, the model files are read in first, in the order listed, and the model program specified in the PROC NLP step is appended after the model program read from the MODEL= files.

The INCLUDE statement can be used to append model code to the current model code. The contents of the model files are inserted into the current model at the position where the INCLUDE statement appears.

Note that the following statements are not part of the program code that is written to an OUTMODEL= data set: MIN, MAX, LSQ, MINQUAD, MAXQUAD, PARMS, BOUNDS, BY, CRPJAC, GRADIENT, HESSIAN, JACNLC, JACOBIAN, LABEL, LINCON, MATRIX, NLINCON.

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.