nls2.psi - Description of Functions of Parameters Estimated by nls2
On to:
DESCRIPTION
FILE STRUCTURE
SYNTAX
DECLARATION PART
EXPRESSION PART
SEE-ALSO
EXAMPLES
DESCRIPTION:
The symbolic description of functions of parameters estimated by `nls2'
should be contained in an operating-system file.
This entry describes the general syntax of this file.
FILE STRUCTURE:
The description file is divided into two parts.
The first part is the Declaration Part and
contains identifier declarations. The second part is
the Expression Part and contains
the expressions of the functions.
The Expression Part is not required if the user provides
a C or Fortran program for evaluating the functions.
SYNTAX:
The declarations and the expressions are delimited by a
semi-column character (";") and the elements within lists by a comma
(",").
Lower and upper case letters are distinguished.
Comments begin with the "" character
and end with the new-line character.
Lines that contain only the "" character
are not accepted.
Comments should not be inserted within lists.
DECLARATION PART:
All identifiers that appear in the expressions
must be declared. Even
if no Expression Part is provided,
some identifiers are always required.
An identifier - or a list of identifiers -
is declared
by naming it after a keyword.
Identifiers must begin with a letter ([a-z, A-Z])
that may be followed by any number of characters among
[a-z, A-Z, 0-9,_].
Don't use keywords as identifiers.
The keywords and what they introduce are:
- psi
-
the names of the functions (always required).
- ppsi
-
the names of the parameters (always required).
- pbispsi
-
the names of the second level parameters
(i.e parameters not estimated by `nls2').
- varpsi
-
when a function depends on variables, the names of the variables.
Only one function is allowed in that case.
- const
-
the names of the numerical constants used in the expressions, if any.
- aux
-
the names of the auxiliary variables used in the expressions, if any.
Introducing auxiliary variables may simplify the expressions
or avoid calculating the same quantities several times.
- filename
-
the pathname of the C-source file that is generated automatically from the description-file
when the Expression Part is provided.
By default, the name of the current file
followed by a ".c" suffix.
EXPRESSION PART:
The Expression Part begins with these 2 lines:
subroutine
begin
and ends with the line:
end
The other lines are of the type:
name=expr
where name is one of the identifiers declared by the
keywords "psi", "aux", "const".
When "const",
expr is always a number
(for example: 23, -.0e+10, .2).
expr are expressions built with the following operators:
=, +, -, *, /, **
log, log10, sin, tg, cos, exp,
if then else fi
==, !=, >, <, <=, >= (comparison operators)
and, or, not.
Parentheses can be used.
SEE ALSO:
`calcpsinls2', `confidence.nls2', `ellips.nls2',
`bootstrap.nls2', `wald.nls2', `nls2.mypsi', `loadnls2'.
EXAMPLES:
Example 1:
psi ps;
ppsi a,b,g;
varpsi z;
subroutine;
begin
ps=exp(-g*log10(a+b*z));
end
Example 2:
psi f1;
ppsi g;
aux a1;
subroutine;
begin
a1=exp(2*log(g));
f1=if a1 < 0.00001 then 100 else 1/g fi;
end
Example 3:
psi ps1, ps2;
ppsi n,d,a,b,g;
subroutine;
begin
ps1=-1/b*(a+b*log10(g));
ps2=n+(d-n)*exp(g*log10(g/(1+g)));
end
Example 4: case of a program previously loaded.
The model description file contains declarations only:
psi ps1, ps2;
ppsi n,d,a,b,g;
- Mon Sep 30 1996 -