calcpsinls2 - Functions of Parameters Estimated by nls2
On to:
DESCRIPTION
USAGE
REQUIRED-ARGUMENTS
OPTIONAL-ARGUMENTS
VALUE
CONSTRAINTS
SIDE-EFFECTS
SEE-ALSO
EXAMPLE
DESCRIPTION:
Intended to
study functions of
parameters that have been estimated by `nls2':
it calculates the values of one or several functions
and the values of their derivatives with respect to the active parameters.
USAGE:
calcpsinls2(file, ppsi, pbispsi=NULL, varpsi=NULL)
REQUIRED ARGUMENTS:
- file
-
a character string equal to the pathname
of the operating-system file that contains the formal description of the
functions (see `nls2.psi').
- ppsi
-
a vector that contains the values of the parameters.
If labelled, only the elements whose names are present in
the `ppsi' declaration of the formal description-file
are taken into account.
If not labelled, the values
must be sorted according to the declaration.
OPTIONAL ARGUMENTS:
- pbispsi
-
the vector of the values of the second level parameters
(i.e parameters not estimated).
If labelled, only the elements whose names are present
in the `pbispsi' declaration of the formal description-file
are taken into account.
If not labelled, the values must be sorted according to the
declaration.
- varpsi
-
a vector or a matrix that contains
the values of the variables declared by
the `varpsi' declaration of the formal description-file.
It is a matrix if there are several variables.
If the columns are labelled, only those whose names are present in the
declaration are taken into account.
If the columns are not labelled, they
must be sorted according to the declaration.
VALUE:
a list with the following components:
- psi:
-
the values of the functions.
A vector of length equal either to the number of values
of the "varpsi" variables, or to the number of functions.
- d.psi:
-
the derivatives of the functions with respect to the
active parameters.
A matrix whose number of rows is equal to the length
of the component `psi'
and number of columns is equal to the length of the
`ppsi' declaration of the formal description-file.
CONSTRAINTS:
The function `loadnls2' should have been previously called
to load into the S-session all the programs necessary
for execution.
SIDE EFFECTS:
If no program has been previously loaded to calculate the functions
(see `loadnls2'),
an operating-system file is created which contains the C-program
that corresponds to the formal description of the functions.
If it already exists, it is replaced.
SEE ALSO:
`nls2', `loadnls2', `nls2.psi', `ellips.nls2', `wald.nls2'
EXAMPLE:
Example CORTISOL:
The description-file, named "modelpsi", is the following:
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
The commands of the S-session are:
loadnls2(model=NULL,psi="")
psinls2.out <- calcpsinls2("modelpsi", ppsi=0.6011405)
- Mon Sep 30 1996 -