family.rsm.object {marg} | R Documentation |
Family Object for Regression-Scale Models
Description
Class of objects that characterize the error distribution of a regression-scale model.
Generation
This class of objects is returned by a call to a family.rsm
generator function. See rsm.families
for the
distributions which are supported by the marg
package. The
object includes a list of functions and expressions that
characterize the error distribution of a regression-scale model.
These are used by the IRLS algorithm implemented in the
rsm
fitting routine. New families can be added to the
ones already supported. See the demonstration file
‘margdemo.R’ that ships with the package. There is a
print
method for family.rsm
objects which
produces a simple summary without any detail; use
unclass(family.rsm.object)
to see the contents.
Structure
The following components, with the corresponding functionality,
are required for a family.rsm
object:
family
-
a character vector giving the family name.
g0
-
a function that yields minus the log density of the error distribution in the regression-scale model.
g1
-
a function that yields the first derivative of minus the log density.
g2
-
a function that yields the second derivative of minus the log density.
df
-
argument with
NULL
value; must be included to guarantee compatibility with the existing code. k
-
argument with
NULL
value; must be included to guarantee compatibility with the existing code.
Note
For the sake of compatibility, the g0
, g1
and
g2
functions of a user-defined family can only take two
arguments: y
representing an observation and the
...
argument which absorbes any additional arguments.