getContrasts {gnm}R Documentation

Estimated Contrasts and Standard Errors for Parameters in a gnm Model

Description

For each set in a specified list of sets of parameters from a gnm model, computes the estimated simple contrasts (i.e., differences) with the last parameter in the set, and estimated standard errors for those estimated differences.

Usage

getContrasts(model, sets = NULL, nSets = 1, ...)

Arguments

model a model object of class "gnm"
sets a vector of indices (if nSets is 1) or a list (of length nSets) of such vectors
nSets the number of vectors of indices to use
... arguments to pass to other functions

Details

The indices must all be in 1:length(coef(object)). If sets = NULL, a Tk dialog is presented for the selection of indices (model coefficients).

For each set of coefficients selected, differences with the last coefficient and their standard errors are computed. A check is performed first on the estimability of all such differences.

Value

A list (of length nSets) of data frames, each containing variables estimate and se

Author(s)

David Firth

See Also

gnm, se, checkEstimable

Examples

set.seed(1)
data(yaish)

## Fit the "UNIDIFF" mobility model across education levels
unidiff <- gnm(Freq ~ educ:orig + educ:dest +
               Mult(Exp(-1 + educ), orig:dest), family = poisson,
               data = yaish)
## Examine the education multipliers (differences on the log scale):
getContrasts(unidiff, grep("Mult1.Factor1", names(coef(unidiff))))

[Package gnm version 0.6-1 Index]