wald.nls2 - Wald Test for Functions of Parameters Estimated by nls2


On to:
DESCRIPTION
USAGE
REQUIRED-ARGUMENTS
OPTIONAL-ARGUMENTS
VALUE
CONSTRAINTS
SIDE-EFFECTS
DETAILS
NOTE
SEE-ALSO
EXAMPLE



DESCRIPTION:

Calculate the Wald statistic for testing the nullity of functions of parameters that have been estimated by `nls2'.


USAGE:
wald.nls2(nls2.object, file, 
  pbispsi=c(nls2.object$model$gamf, nls2.object$model$gamv), 
  varpsi=NULL)

REQUIRED ARGUMENTS:
nls2.object
an object of class `nls2'.
file
a character string equal to the pathname of the operating-system file that contains the description of the functions (see `nls2.psi').

Sommaire


OPTIONAL ARGUMENTS:

pbispsi
When functions depend on second level parameters (i.e parameters not estimated by `nls2'), a vector that contains the values of these parameters.
If "pbispsi" is labelled, only the elements whose names are present in the `pbispsi' declaration of the formal description-file are taken into account. If it is not labelled, its values must be sorted according to the declaration.
By default if there is a `pbispsi' declaration in the formal description-file, it is set to the second level parameters of the `nls2.object'.
varpsi
when functions depend on variables, a vector or a matrix that contains the values of the variables introduced by the `varpsi' declaration in the formal description-file.
It is a matrix if there are several variables. If its columns are labelled, only those whose names are present in the `varpsi' declaration of the formal description-file are taken into account. If its columns are not labelled, they must be sorted according to the declaration.

Sommaire


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 argument `varpsi', or to the number of functions.
"d.psi": the derivatives of the functions with respect to the active parameters introduced by the `ppsi' declaration in the formal description-file.
A matrix whose number of rows is equal to the length of the "psi" component and number of columns is equal to the length of the `ppsi' declaration of the formal description-file.
"std.error": the standard error of the functions values.
"var.psi": the variance of the functions.
"statistic": the value of the Wald statistic.


CONSTRAINTS:

In the input argument `nls2.object', component `as.var' should exist.

The function `loadnls2', argument `psi' not NULL, should have been previously called.


Sommaire

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 this file already exists, it is replaced.


DETAILS:

This function is a method for the generic function `wald' for class `nls2'. It can be invoked by calling `wald' for an object of the appropriate class, or directly by calling `wald.nls2' regardless of the class of the object.


NOTE:

The Wald statistic is calculated by inverting a matrix that may be singular; in that case, a warning is issued.


SEE ALSO:




Sommaire

EXAMPLE:

Example1 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(psi="") wald.out_ wald(nls2.out, "modelpsi")

Example2 CORTISOL: For testing "g=1, h=0", the description-file, named "mod", is: psi fg, fh; ppsi g, h; subroutine; begin fg = g -1; fh = h; end

The commands of the S-session are: loadnls2(psi="") wald.out_wald(nls2.out, "mod")

Sommaire


- Mon Sep 30 1996 -