From chemistry-request@server.ccl.net  Mon Sep 11 08:05:02 2000
Received: from gwdu42.gwdg.de (root@gwdu42.gwdg.de [134.76.10.26])
	by server.ccl.net (8.8.7/8.8.7) with ESMTP id IAA29401
	for <chemistry@ccl.net>; Mon, 11 Sep 2000 08:05:02 -0400
Received: from gwdu20.gwdg.de ([134.76.98.2] ident=dvainiu)
	by gwdu42.gwdg.de with smtp (Exim 3.14 #18)
	id 13YSKN-0003iA-00
	for chemistry@ccl.net; Mon, 11 Sep 2000 14:04:47 +0200
Received: from localhost by gwdu20.gwdg.de (5.65v4.0/1.1.10.5/11Feb98-0154PM)
	id AA18056; Mon, 11 Sep 2000 14:04:46 +0200
Date: Mon, 11 Sep 2000 14:04:46 +0200 (MET DST)
From: Darius Vainius <dvainiu@gwdg.de>
To: chemistry@ccl.net
Subject: Fitting the data of reaction kinetics: FACSIMILE: how do I...
Message-Id: <Pine.OSF.4.10.10009111328100.20836-100000@gwdu20.gwdg.de>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

Hello,

does anybody know how to access the RSQS (Residual Sum of Squares) after
the data fitting run was finished?

>>>...
 !!!!! COMMAND INTERPRETER RE-ENTERED
 
  COMPILE INSTANT;
  LOCN   INSTRUCTION
 
   142:WRITE 1=6, "RSQS = ", (E10,4), RSQS %;
 
 !!!!! ILLEGAL OR UNRECOGNISED NAME
WRITE 1=6, "RSQS = ", (E10,4), RSQS %;
 
 !!!!! ERROR DETECTED AT WORD:
 RSQS                      ENDING IN
 POSITION 35 OF ABOVE LINE
 !!!!! PROCEEDING BUT EXECUTION DELETED
 
  !!!!! ERROR STOP INSTRUCTION COMPILED
 AT LOCATION    158
   159:**;
...<<<

It seems that FACSIMILE compiler doesn't know RSQS, although PSTREAM puts
into  the output the calculated values of the RSQS during the fitting run.

Then, the next thing I tried, was simply to sum the squares of the
RESIDARRAY elements:

(this is just a tail of the code)
>>>...
SETVARY ID IC ;
NBEGIN 200;
BEGIN;

COMPILE INSTANT;
RSSQR = 0.0;
DO 1 FOR #1 = 0 (1) 999;
RSSQR = RSSQR + RESIDARRAY<0,#1> * RESIDARRAY<0,#1>;
LABEL 1;
WRITE 1=6, "RSSQR = ", (E10,4), RSSQR %;
**;

STOP;
<<<

But the value of RSSQR I've got here, is about 2x highier than the RSQS
value, which is putted by PSTREAM into the output:

>>>...
 AFTER   0 ITERATIONS AND   1 RUNS, INDIVIDUAL CURVE STATISTICS ARE
      RSQS        CORI     AUCO     AUCR
   3.6781E+01  -0.3466   0.0431   0.0316
 TOTAL RESIDUAL SUM OF SQUARES IS      3.67813E+01
 MEAN ABSOLUTE CORRELATION INDEX IS   0.34656
 VARY(  1):ID                        =  2.1650E+05
 VARY(  2):IC                        =  1.8596E+05
         1 SIMULATION RUNS COMPLETED
         2 SIMULATION RUNS COMPLETED
         3 SIMULATION RUNS COMPLETED
 
 PARAMETER NUMBER, TYPE,     NAME,                     VALUE
               1   PRI.     ID                         2.1650E+05
               2   PRI.     IC                         1.8596E+05
 
 RESIDUAL SUM OF SQUARES =  3.6781E+01 FOR  998 DEGREES OF FREEDOM
 
 SINGULAR VALUES OF DEPENDENCE MATRIX AND STRUCTURE OF COMPONENTS
 
                   VALUES   2481.822  455.336
 
ID                          0.11017 -0.99391
IC                          0.99391  0.11017
 
 FITTED VALUES, ACCURACIES AND CONFIDENCE LIMITS
 NO.   NAME                       VALUE       SDLN   5 PERCENT  95 PERCENT
   1 ID                         2.1650E+05  0.0004  2.1635E+05  2.1665E+05
   2 IC                         1.8596E+05  0.0001  1.8593E+05  1.8599E+05
 
  CORRELATION MATRIX COMPONENTS
 
 COLUMN     1      2
 ROW    1  1.000 -0.500
 ROW    2 -0.500  1.000
 
 !!!!! COMMAND INTERPRETER RE-ENTERED
 
 COMPILE INSTANT;
  LOCN   INSTRUCTION
 
   142:RSSQR = 0.0;
   148:DO 1 FOR #1 = 0 (1) 999;
   156:RSSQR = RSSQR + RESIDARRAY<0,#1> * RESIDARRAY<0,#1>;
   169:LABEL 1;
   196:WRITE 1=6, "RSSQR = ", (E10,4), RSSQR %;
   217:**;
 
 <...>
  
RSSQR =  6.172E+01
 
 STOP;
 
 !!!!! STOP
 
 !!!!! FORMATTED WRITE NUMBER  1 CLEARED
...<<<

So, why do these values differ?
Or maybe I'm doing something wrong here?

Many thanks in advance,

Darius

--
Darius Vainius
Department of Molecular Biology
Max Planck Institute for Biophysical Chemistry

e-mail:  dvainius@mpc186.mpibpc.gwdg.de



