plvar.nls2 - Plot an nls2 Object for Studying the Variance Heterogeneity
On to:
DESCRIPTION
USAGE
REQUIRED-ARGUMENTS
OPTIONAL-ARGUMENTS
CONSTRAINTS
DETAILS
SEE-ALSO
EXAMPLE
DESCRIPTION:
Plot the components of an `nls2.object'
that may help the study of
the variance heterogeneity when there are data replications.
USAGE:
plvar.nls2(nls2.object,
step=nls2.object$nb.steps,
wanted=list(X.S2=T, X.S=F, logX.logS2=F,
Y.S2=T, Y.S=F, logY.logS2=F),
fitted=F,
n.fitted=0,
smooth=F, labels=NULL, title="", figs=c(2, 2),
ask.pause=T, ask.modify=F, ...)
REQUIRED ARGUMENTS:
- nls2.object
-
an object of class `nls2'.
OPTIONAL ARGUMENTS:
- step
-
when the nls2.object has been created by an alternated method of estimation,
the index of the step requested.
By default, the last step.
- wanted
-
a list that specifies the graphs requested;
Its components are logics that should be TRUE if the corresponding
graphs are requested.
"wanted" components and their meanings are:
X.S2:
the empirical variances
are plotted against the independent
variables.
X.S: the square roots of the empirical variances are plotted against the independent
variables.
logX.logS2: the logarithms of the empirical variances
are plotted against the logarithms of the independent
variables.
Y.S2: the empirical variances
are plotted against the empirical means.
If the argument `fitted' is also set,
the fitted variances are plotted against the fitted values
of the regression function
on the same graphs.
Y.S: the square roots of the empirical variances are plotted against the
empirical means.
If the argument `fitted' is also set,
the square roots of the fitted variances are plotted against the fitted values of the regression function
on the same graphs.
logY.logS2: the logarithms of the empirical variances are plotted against the
logarithms of the means.
If the argument `fitted' is also set,
the logarithms of the fitted variances are plotted against the
logarithms of the fitted values of the regression function
on the same graphs.
- fitted
-
a logic that should be TRUE if the fitted values of the variance should
also be plotted.
The points of the fitted values are joined by
lines of different types if there are several curves.
- n.fitted
-
if positive,
this argument implies automatically that the argument `fitted'
is TRUE and that function `loadnls2' has been
previously called.
It is the number of regularly spaced points on the x-axis
where the variance or regression functions are calculated
for improving the fitted curves.
if the argument `n.fitted' is null and the argument `fitted' is TRUE,
only the fitted values
stored in `nls2.object'
(see `nls2.object', component `response') are taken into account.
It is available only
when there is one single variable.
- smooth
-
a logic that should be TRUE if the points of the empirical
variances should be joined.
If so, they are joined by a dotted line after smoothing.
-
labels,title,figs,ask.pause,ask.modify,...
-
See `pldnls2'.
According to the user's preference,
the length of the "labels" vector is equal to the number of observations,
either with replications and null-weighted observations included, or not included.
CONSTRAINTS:
- A graphical device should have been previously activated.
- The data frame containing the observations must be available,
(its name is nls2.object$call$data).
It is then assumed that this data frame has been neither deleted nor
modified since the nls2.object was created.
It must contain replications.
DETAILS:
This function is a method for the generic function `plvar'
for class `nls2'.
It can be invoked by calling `plvar' for an object of the appropriate
class, or directly by calling `plvar.nls2' regardless of the
class of the object.
SEE ALSO:
EXAMPLE:
X11()
par(cex=2)
plvar(nls2.out,fitted=T,
labels=row.names(data),
title="Data cortisol: plvar")
- Mon Sep 30 1996 -