This method function converts
object to another
pdMat
object represented in a natural
parameterization. If
unconstrained is set to
TRUE, the
natural unconstrained parameterization used is the same as the one
used for
object, which is returned unchanged. The exceptions
are the
pdSymm and
pdBand classes (see the
documentation on the appropriate
asNatural method). If
unconstrained
is set to
FALSE, a constrained natural
parameterization is used to represent the object. In this case, a
constructor with the name
Nat appended to the end of the
original
object constructor is called (e.g.,
pdDiagNat
is called for
pdDiag objects).
pdMat objects with
constrained natural parameterization are represented by the
variances and, when appropriate, the covariances of the
positive-definite matrix they represent.
USAGE:
asNatural(object, unconstrained)
REQUIRED ARGUMENTS:
object
an object inheriting from class
pdMat,
representing a positive-definite matrix, whose
representation is to be converted to a natural parameterization.
OPTIONAL ARGUMENTS:
unconstrained
an optional logical value indicating whether the
natural parameterization should be unconstrained. Defaults to
TRUE.
VALUE:
If
unconstrained = TRUE,
object is returned unchanged
(except for
pdSymm and
pdBand objects), else, if
unconstrained = FALSE
, a
pdMat object
parameterized according to the variances and covariances of the
positive-definite matrix they represent - the class corresponding to
these objects is obtained by appending the name
Nat to the
end of the original class of
object.
SEE ALSO:
,
,
,
EXAMPLES:
pd1 <- pdDiag(diag(1:3), form = ~age+age^2, data = Orthodont)
asNatural(pd1, unc = F)