| ofInterest | R Documentation |
Retrieve or set the "ofInterest" component of a "gnm"
(generalized nonlinear model) object.
ofInterest(object)
ofInterest(object) <- value
object |
an object of class |
value |
a numeric vector of indices specifying the subset of
(non-eliminated) coefficients of interest, or |
The "ofInterest" component of a "gnm" object is a named
numeric vector of indices specifying a subset of the non-eliminated
coefficients which are of specific interest.
If the "ofInterest" component is non-NULL, printed summaries of
the model only show the coefficients of interest. In addition
methods for "gnm" objects which may be applied to a subset of
the parameters are by default applied to the coefficients of interest.
These functions provide a way of extracting and replacing the
"ofInterest" component. The replacement function prints the
replacement value to show which parameters have been specified by
value.
A named vector of indices, or NULL.
Regular expression matching is performed using grep with
default settings.
Heather Turner
grep, gnm, se.gnm,
getContrasts,profile.gnm, confint.gnm
set.seed(1)
## Fit the "UNIDIFF" mobility model across education levels
unidiff <- gnm(Freq ~ educ*orig + educ*dest +
Mult(Exp(educ), orig:dest),
ofInterest = "[.]educ", family = poisson,
data = yaish, subset = (dest != 7))
ofInterest(unidiff)
## Get all of the contrasts with educ1 in the UNIDIFF multipliers
getContrasts(unidiff, ofInterest(unidiff))
## Get estimate and se for the contrast between educ4 and educ5 in the
## UNIDIFF multiplier
mycontrast <- numeric(length(coef(unidiff)))
mycontrast[ofInterest(unidiff)[4:5]] <- c(1, -1)
se(unidiff, mycontrast)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.