The "respModule" class is the virtual base class of
response modules for glpModel model objects.
Classes that inherit from "respModule" include
glmRespMod, for
generalized linear models, nlsRespMod, for
nonlinear models and nglmRespMod for generalized
nonlinear models.
Objects from the Class
Objects from these classes are usually created with
mkRespMod as part of an glpModel
object returned by model-fitting functions such as the hidden function
glm4.
Slots
mu:
Fitted mean response.
offset:
offset in the linear predictor – always
present even if it is a vector of zeros. In an
nlsRespMod object the length of the offset can be
a multiple of the length of the response.
sqrtXwt:
the matrix of
weights for the model matrices, derived from the sqrtrwt slot.
sqrtrwt:
Numeric vector of the square roots
of the weights for the residuals. For
respModule and nlsRespMod
objects these are constant. For
glmRespMod and nglmRespMod
objects these are updated at each iteration of the iteratively
reweighted least squares algorithm.
weights:
Prior
weights – always present even when it is a vector of ones.
y:
Numeric response vector.
family:
a glm family, see family for
details - glmRespMod objects only.
eta:
numeric vector, the linear predictor that is
transformed to the conditional mean via the link function -
glmRespMod objects only.
n:
a numeric vector used for calculation of the aic family
function (it is really only used with the binomial family but
we need to include it everywhere) - glmRespMod objects only.
nlenv:
an environment in which to evaluate the
nonlinear model function - nlsRespMod objects only.
nlmod:
an unevaluated call to the
nonlinear model function - nlsRespMod objects only.
pnames:
a character vector of parameter names -
nlsRespMod objects only.
Methods
fitted
signature(object = "respModule"): fitted values;
there may be several types, corresponding to the residuals, see there
(below).
residuals
signature(object = "respModule"): residuals,
depending on the type of the model, there are several types of
residuals and correspondingly residuals,
see residuals.glm from the
stats package. Because many of these types of residuals are
identical except for objects that inherit from "glmRespMod", a
separate method is defined for this subclass.
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(MatrixModels)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/MatrixModels/respModule-class.Rd_%03d_medium.png", width=480, height=480)
> ### Name: respModule-class
> ### Title: "respModule" and derived classes
> ### Aliases: respModule-class glmRespMod-class nlsRespMod-class
> ### nglmRespMod-class fitted,respModule-method
> ### residuals,respModule-method residuals,glmRespMod-method
> ### Keywords: classes
>
> ### ** Examples
>
> showClass("respModule")
Class "respModule" [package "MatrixModels"]
Slots:
Name: mu offset sqrtXwt sqrtrwt weights wtres y
Class: numeric numeric matrix numeric numeric numeric numeric
Known Subclasses:
Class "glmRespMod", directly
Class "nlsRespMod", directly
Class "nglmRespMod", by class "glmRespMod", distance 2
> showClass("glmRespMod")
Class "glmRespMod" [package "MatrixModels"]
Slots:
Name: family eta n mu offset sqrtXwt sqrtrwt weights wtres
Class: family numeric numeric numeric numeric matrix numeric numeric numeric
Name: y
Class: numeric
Extends: "respModule"
Known Subclasses: "nglmRespMod"
> showClass("nlsRespMod")
Class "nlsRespMod" [package "MatrixModels"]
Slots:
Name: nlenv nlmod pnames mu offset sqrtXwt
Class: environment call character numeric numeric matrix
Name: sqrtrwt weights wtres y
Class: numeric numeric numeric numeric
Extends: "respModule"
Known Subclasses: "nglmRespMod"
>
>
>
>
>
> dev.off()
null device
1
>