iNZightSummary {iNZightRegression} | R Documentation |
Informative Summary Information for Regression Models
Description
The iNZight summary improves upon the base R summary output for fitted regression models. More information is provided and displayed in a more intuitive format. This function both creates and returns a summary object, as well as printing it.
Usage
iNZightSummary(
x,
method = "standard",
reorder.factors = FALSE,
digits = max(3, getOption("digits") - 3),
symbolic.cor = x$symbolic.cor,
signif.stars = getOption("show.signif.stars"),
exclude = NULL,
exponentiate.ci = FALSE,
...
)
Arguments
x |
an object of class |
method |
one of either |
reorder.factors |
logical, if |
digits |
the number of significant digits to use when printing. |
symbolic.cor |
logical, if |
signif.stars |
logical, if |
exclude |
a character vector of names of variables to be excluded from the summary output (i.e., confounding variables). |
exponentiate.ci |
logical, if |
... |
further arguments passed to and from other methods. |
Details
This summary function provides more information in the following ways:
Factor headers are now given. The base level for a factor is also listed with an estimate of 0. This is to make it clear what the base level of a factor is, rather than attempting to work out by deduction from what has already been printed.
The p-value of a factor is now given; this is the output from
Anova
, which calculates the p-value based off of
Type III sums of squares, rather than sequentially as done by
anova
.
Each level of a factor is indented by 2 characters for its label and its p-value to distinguish between a factor, and levels of a factor.
The labels for each level of an interaction are now just the levels of
the factor (separated by a .
), rather than being prepended with
the factor name also.
Value
An object of class summary.lm
, summary.glm
, or
summary.svyglm
.
Note
If any level is not observed in a factor, no p-values will be printed on all factors. This is because we cannot calculate Type III sums of squares when this is the case.
The fitted model currently requires that the data are stored in a
dataframe, which is pointed at by the data
argument to
lm
(or equivalent).
Author(s)
Simon Potter, Tom Elliott.
See Also
The model fitting functions lm
, glm
, and
summary
.
The survey
package.
Function coef
will extract the matrix of coefficients
with standard errors, t-statistics and p-values.
To calculate p-values for factors, use Anova
with
type III sums of squares.
Examples
m <- lm(Sepal.Length ~ ., data = iris)
iNZightSummary(m)
# exclude confounding variables for which you don't
# need to know about their coefficients:
iNZightSummary(m, exclude = "Sepal.Width")