plot.summclust {summclust}R Documentation

Plotting method for objects of type summclust

Description

Plots residual leverage, partial leverage and the leave-one-cluster-out regression coefficients

Usage

## S3 method for class 'summclust'
plot(x, ...)

Arguments

x

An object of type summclust

...

other optional function arguments

Details

Note that the function requires ggplot2 to be installed.

Value

A list containing

residual_leverage

A ggplot of the residual leverages

coef_leverage

A ggplot of the coefficient leverages

coef_beta

A ggplot of the leave-one-out cluster jackknife regression coefficients

References

MacKinnon, James G., Morten Ørregaard Nielsen, and Matthew D. Webb. "Leverage, influence, and the jackknife in clustered regression models: Reliable inference using summclust." arXiv preprint arXiv:2205.03288 (2022).

Examples


library(summclust)
data(mtcars)
mtcars

fit <- lm(mpg ~ cyl + disp + hp, data = mtcars)
summ <- summclust(fit, params = ~cyl + disp, cluster = ~carb)
summary(summ)
tidy(summ)
plot(summ)


[Package summclust version 0.7.2 Index]