yotov_clustered_summary: Stata-Like Clustered Standard Errors Summary

Description Usage Arguments Examples

View source: R/clustered-summary.R

Description

Returns a list for a a general lm or glm which returns number of observations, F-statistic (with degrees of freedom and p-value), R-squared (and pseudo R-squared for poisson-type generalized models), root MSE and clustered standard errors for estimated coefficients.

Usage

1
yotov_clustered_summary(model, cluster)

Arguments

model

Any lm or glm object

cluster

The clustering variable in the model data (e.g. "pair_id")

Examples

1
2
3
4
5
6
7
# THESE REGRESSIONS ARE JUST FOR TESTING!!!

model1 <- lm(mpg ~ wt, data = mtcars)
yotov_clustered_summary(model1, "cyl")

model2 <- glm(mpg ~ wt, data = mtcars, family = quasipoisson)
yotov_clustered_summary(model2, "cyl")

yotover documentation built on Jan. 28, 2021, 9:06 a.m.