iso.nls2 - Confidence Regions for an nls2 Object


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



DESCRIPTION:

Return what is necessary to define confidence regions in the space of two parameters that have been estimated by function `nls2' when the statistical criterion is equal to -2*log(likelihood)/n, where n is the total number of observations.

Let p1, p2 be two active parameters and stat.crit the estimated statistical criterion. The returned structure contains the quantities "z(x,y)=C(x,y)-(stat.crit*n)", x and y varying on a grid regularly spaced around p1, p2.
"C(x,y)" is the quantity "-2*log(likelihood)" calculated at p1=x, p2=y, the remaining parameters set to the estimated values.

The extends of the grid and the density of the points can be different for x and y and at each side of p1, p2.

From z, confidence regions can be defined and plotted: a confidence region is the set of points for which z is less or equal to the quantile of a chi-square distribution with number of degrees of freedom equal to the number of active parameters.


Sommaire

USAGE:

iso.nls2(nls2.object, axis,
         extends=matrix(3,nrow=2,ncol=2),
         density=matrix(12,nrow=2,ncol=2),
         bounds=NULL)

REQUIRED ARGUMENTS:
nls2.object
an object of class `nls2' (see `nls2.object').
axis
the identification of the two-dimensional space (x,y). Vector of length 2, either character (the names of the parameters) or integer (values from 1 to the total number of multiple parameters, the variance parameters been numbered after the regression parameters).

Sommaire

OPTIONAL ARGUMENTS:

extends
the extends of the grid. A matrix of 2 columns and 2 rows: the lower bound of x is "p1-(extends[1,1]*se1)" where se1 is the standard error of p1, and its upper bound is "p1+(extends[2,1]*se1)". Similarly, the lower and upper bounds of y are "p2-(extends[1,2]*se2)"and "p2+(extends[2,2]*se2)", se2 being the standard error of p2.
density
the density of the points along the grid. A matrix of 2 columns and 2 rows: density[1,1] is the number of points x at the left side of p1 and density[2,1] is the number of points at its right. Similarly, density[1,2] and density[2,2] are the number of points y at the left and at the right sides of p2.
bounds
The bounds of the grid. When this argument exists, it replaces the argument `extends'.
A matrix of 2 columns and 2 rows: bounds[1,1] is the lower bound of x and bounds[2,1] is its upper bound. Similarly, bounds[1,2] and bounds[2,2] are the lower and upper bounds of y.

Sommaire


VALUE:

A list with the following components:
"x": the coordinates of the points x. Vector of length "density[1,1]+density[2,1]"
"y": the coordinates of the points y. Vector of length "density[1,2]+density[2,2]".
"z": the values of the grid. Matrix of dimension (length(x), length(y)). "z[i,j]" is the value at the point (x[i],y[j]).


Sommaire

CONSTRAINTS:

Function `loadnls2' should have been previously called to load into the S-session all the programs necessary for execution and the file that describes the model must exist.


SIDE EFFECTS:

If no program has been previously loaded to calculate the model (see `loadnls2'), an operating-system file is created which contains the C-programs that correspond to the formal description of the model. If this file already exists, it is replaced.


DETAILS:

When the statistical criterion is not equal to "-2*log(likelihood)/n" in the `nls2.object', a warning is issued and the quantity "-2*log(likelihood)/n" is used in the calculations instead of the statistical criterion.

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


Sommaire

SEE ALSO:

EXAMPLE:
   loadnls2()
   iso.out_ iso(nls2.out, axis=c(1,2))
# Plot of iso-contours for different probabilities:
# The levels are the quantiles of a chi-square distribution 
# with number of degrees of freedom equal to five, because 
# five parameters have been estimated in the nls2.object.
   X11()
   contour(iso.out, levels=qchisq(c(0.50, 0.90, 0.99),5))

Sommaire


- Mon Sep 30 1996 -