jmdem.summaries: Accessing Joint Mean and Dispersion Effect Model Fits

Description Usage Arguments Details Author(s) References See Also Examples

Description

These functions are all methods for class jmdem or summary.jmdem objects.

Usage

1
2
3
4
5
6
7
8
9
## S3 method for class 'jmdem'
formula(x, submodel = c("both", "mean", "dispersion"), ...)

## S3 method for class 'jmdem'
family(object, submodel = c("both", "mean", "dispersion"), ...)

## S3 method for class 'jmdem'
residuals(object, type = c("deviance", "pearson", "working",
                           "response", "partial"), ...)

Arguments

x, object

the function family accesses the family objects which are stored within objects created by jmdem.

submodel

character. The family of the specified submodel. For both, the families of the mean and dispersion submodels will be return in a list of 2 elements.

type

character. For residuals, the type of residuals which should be returned. The alternatives are: "deviance" (default), "pearson", "working", "response", and "partial".

...

further arguments passed to methods.

Details

family is a generic function with methods for class "jmdem". See family for details.

Here formula is referred to the case that it is called on a fitted jmdem model object. The default first, depending on the specified submodel argument, looks for a "mean.formula" and/or "dispersion.formula" component of the jmdem object (and evaluates it), then a "mean.terms" and/or "dispersion.terms" component, then a mformula and/or dformula parameter of the call (and evaluates its value) and finally a "formula" attribute.

The references define the types of residuals: Davison & Snell is a good reference for the usages of each.

The partial residuals are a matrix of working residuals, with each column formed by omitting a term from the model.

How residuals treats cases with missing values in the original fit is determined by the na.action argument of that fit. If na.action = na.omit omitted cases will not appear in the residuals, whereas if na.action = na.exclude they will appear, with residual value NA. See also naresid.

For fits done with y = FALSE the response values are computed from other components.

Author(s)

Karl Wu Ka Yui (karlwuky@suss.edu.sg)

References

Cox, D. R. and Snell, E. J. (1981). Applied Statistics; Principles and Examples. London: Chapman and Hall.

Chambers, J. M. and Hastie, T. J. (1992) Statistical Models in S. Wadsworth & Brooks/Cole.

Davison, A. C. and Snell, E. J. (1991). Residuals and diagnostics. In: Statistical Theory and Modelling. In Honour of Sir David Cox, FRS, eds. Hinkley, D. V., Reid, N. and Snell, E. J., Chapman & Hall.

Dobson, A. J. (1983). An Introduction to Statistical Modelling. London: Chapman and Hall.

Hastie, T. J. and Pregibon, D. (1992). Generalized linear models. Chapter 6 of Statistical Models in S eds J. M. Chambers and T. J. Hastie, Wadsworth & Brooks/Cole.

McCullagh P. and Nelder, J. A. (1989). Generalized Linear Models. London: Chapman and Hall.

See Also

jmdem, anova.jmdem, coef, deviance, df.residual, effects, fitted, weighted.residuals, residuals, residuals.jmdem, summary.jmdem, weights.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## The jmdem(...) example
MyData <- simdata.jmdem.sim(mformula = y ~ x, dformula = ~ z, 
                            mfamily = poisson(), 
                            dfamily = Gamma(link = "log"), 
                            beta.true = c(0.5, 4), 
                            lambda.true = c(2.5, 3), n = 100)
                            
fit <- jmdem(mformula = y ~ x, dformula = ~ z, data = MyData, 
             mfamily = poisson, dfamily = Gamma(link = "log"), 
             dev.type = "deviance", method = "CG")

coef(fit)
plot(resid(fit), fitted(fit))
abline(h = 0, lty = 2, col = "gray")

jmdem documentation built on March 13, 2020, 2:20 a.m.

Related to jmdem.summaries in jmdem...