Problem Note 37420: Equation errors may not be perturbed when SDATA = option is specified for ODE Monte Carlo simulation
If you specify ordinary differential equations, specify the RANDOM= option on the SOLVE statement to request Monte Carlo simulations, and specify the SDATA= option on the SOLVE statement to compute perturbations on the equation errors, then the perturbations on the equation errors are not performed and the resulting Monte Carlo simulation results are incorrect.
There are several possible circumventions for the problem. If you have a closed form analytical solution to the differential equation, then specify the analytical solution directly instead of specifying differential equations. If you do not have closed form analytical solution to the differential equations, then you may need to include an algebraic equation for the SOLVE task to avoid the problem. For example, you can assign the derivative variable to be solved for to a temporary variable and solve for the temporary variable instead of the original derivative variable. The following example shows how you can accomplish this circumvention. The original code for ODE Monte Carlo simulation without then algebraic equation is as follows:
proc model data=fish time=day;
endo conc ;
parm ku 0.3 ke 0.3;
dert.conc = ku - ke * conc;
solve conc /data=daydata random=100 sdata=s seed=12345 out=outs;
run;
quit;
To include algebraic equations by assigning a temporary variable, you can specify something like this code to avoid the problem:
proc model data=fish time=day;
endo conc tmpconc;
parm ku 0.3 ke 0.3;
dert.conc = ku - ke * conc;
tmpconc = conc;
solve tmpconc /data=daydata random=100 sdata=s seed=12345 out=outs;
run;
quit;
Please note that the above mentioned circumvention of including an algebraic equation to the SOLVE statement works for SAS 8.2 and SAS 9.2. It might not work for SAS 9.1 in which case a Read Access Violation error can be encountered.
Operating System and Release Information
| SAS System | SAS/ETS | z/OS | 8.2 TS2M0 | |
| OpenVMS VAX | 8.2 TS2M0 | |
| OS/2 | 8.2 TS2M0 | |
| Microsoft Windows 95/98 | 8.2 TS2M0 | |
| Microsoft Windows 2000 Advanced Server | 8.2 TS2M0 | |
| Microsoft Windows 2000 Datacenter Server | 8.2 TS2M0 | |
| Microsoft Windows 2000 Server | 8.2 TS2M0 | |
| Microsoft Windows 2000 Professional | 8.2 TS2M0 | |
| Microsoft Windows NT Workstation | 8.2 TS2M0 | |
| Microsoft Windows Server 2003 Datacenter Edition | 8.2 TS2M0 | |
| Microsoft Windows Server 2003 Enterprise Edition | 8.2 TS2M0 | |
| Microsoft Windows Server 2003 Standard Edition | 8.2 TS2M0 | |
| Microsoft Windows XP Professional | 8.2 TS2M0 | |
| Windows Millennium Edition (Me) | 8.2 TS2M0 | |
| 64-bit Enabled AIX | 8.2 TS2M0 | |
| 64-bit Enabled HP-UX | 8.2 TS2M0 | |
| 64-bit Enabled Solaris | 8.2 TS2M0 | |
| ABI+ for Intel Architecture | 8.2 TS2M0 | |
| AIX | 8.2 TS2M0 | |
| HP-UX | 8.2 TS2M0 | |
| IRIX | 8.2 TS2M0 | |
| Linux | 8.2 TS2M0 | |
| OpenVMS Alpha | 8.2 TS2M0 | |
| Solaris | 8.2 TS2M0 | |
| Tru64 UNIX | 8.2 TS2M0 | |
*
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: | Problem Note |
| Priority: | high |
| Topic: | SAS Reference ==> Procedures ==> MODEL Analytics ==> Simulation Analytics ==> Econometrics
|
| Date Modified: | 2009-10-20 10:32:27 |
| Date Created: | 2009-10-09 15:23:57 |