Usage Note 22779: How can I solve a system of n equations in n unknowns?
For estimation of a linear system of simultaneous equations using either twostage or threestage least squares, use SAS/ETS software's SYSLIN procedure with the 2SLS or 3SLS option in the PROC SYSLIN statement. For estimation of a nonlinear system of simultaneous equations using either twostage or threestage least squares, use the SAS/ETS software's MODEL procedure with the 2SLS or 3SLS option in the FIT statement.
For a system of linear or nonlinear equations, you can use the SOLVE statement in PROC MODEL to obtain the unknowns. You must specify the equations
in general form and provide starting values in an input data set for each unknown. The following example illustrates how to solve n nonlinear equations in n unknowns:
/************************************************************
* This sample job illustrates how to solve a system *
* of nonlinear equations using PROC MODEL. The equations *
* to solve are as follows: *
* x1 + x2  x1*x2 = 2 *
* x1 * exp(x2) = 1 *
*************************************************************/
data init; ** supply initial values **;
x1=.2; x2=2;
run;
proc model data=init;
eq.one = x1 + x2  x1*x2 + 2;
eq.two = x1 * exp(x2)  1;
solve x1 x2/itprint out=solved outpredict;
run;
proc print data=solved;
run;
Operating System and Release Information
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type:  Usage Note 
Priority:  low 
Topic:  SAS Reference ==> Procedures ==> MODEL Analytics Analytics ==> Forecasting Analytics ==> Simulation Analytics ==> Time Series Analysis

Date Modified:  20070808 08:28:37 
Date Created:  20021216 10:56:36 