getcoeftable {relevance} | R Documentation |
Extract Components of a Fit
Description
Retrieve the table of coefficients and standard errors, or the scale parameter, or the factors needed for standardizing coefficients from diverse model fitting results
Usage
getcoeftable(object)
getscalepar(object)
getcoeffactor(object, standardize = TRUE)
Arguments
object |
an R object resulting from a model fitting function |
standardize |
ligical: should a scaling factor for
the response variable be determined (calling |
Details
Object regrModelClasses
contains the names of the
classes for which the result should work.
For other model classes, the function is not tested and may fail.
Value
For getcoeftable
:
Matrix containing at least the two columns containing the estimated
coefficients (first column) and the standard errors (second column).
For getscalepar
: scale parameter.
For getcoeffactor
: vector of multiplicative factors,
with attributes
scale
, fitclass
and family
or dist
according to object
.
Author(s)
Werner A. Stahel
Examples
rr <- lm(Fertility ~ . , data = swiss)
getcoeftable(rr) # identical to coef(summary(rr)) or also summary(rr)$coefficients
getscalepar(rr)
if(requireNamespace("survival", quietly=TRUE)) {
data(ovarian) ## , package="survival"
rs <- survival::survreg(survival::Surv(futime, fustat) ~ ecog.ps + rx,
data = ovarian, dist = "weibull")
getcoeftable(rs)
getcoeffactor(rs)
}