Coefficients of Interest in a Generalized Nonlinear Model
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
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)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.