Learn R Programming

yotover (version 0.3.5)

yotov_clustered_summary: Stata-Like Clustered Standard Errors Summary

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

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

Run this code
# NOT RUN {
# 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")
# }

Run the code above in your browser using DataLab