goodman_generalize: Goodman Regression Generalization

Description Usage Arguments Value Author(s) References See Also Examples

Description

Makes summary table out of multiple heckman regression results, for multiple candidates and groups

Usage

1
goodman_generalize(cand_vector, race_group, total, data, table_names, ...)

Arguments

cand_vector

Character vector of candidate names, taken from the dataset

race_group

Character vector of formula, e.g., "~ pct_latino"

total

Character vector (e.g., "totvote") of total variable name from data, variable in data is numeric

data

data.frame() object containing the data

table_names

Character vector of table names with same length as race_group. Used for formatting output

...

Arguments passed onto lm() function

Value

Object of class data.frame() returned containing table summary of all the Goodman regressions

Author(s)

Loren Collingwood <loren.collingwood@ucr.edu>

References

eiPack King et. al. (http://gking.harvard.edu/eiR) L. A. Goodman. Ecological regressions and behavior of individuals. American Sociological Review, 1953.

See Also

ei_rc_good_table

Examples

1
2
3
4
5
6
7
8
9
# Load corona data
data(corona)
# Generate character vectors
cands <- c("pct_husted","pct_spiegel","pct_ruth","pct_button","pct_montanez","pct_fox")
race_group3 <- c("~ pct_hisp", "~ pct_asian", "~ pct_white")

# Goodman Regression
table_names <- c("Good: Pct Lat", "Good: Pct Asian", "Good: Pct Wht")
good_corona <- goodman_generalize(cands, race_group3, "totvote", corona, table_names)

lorenc5/eiCompare documentation built on June 5, 2019, 5:18 p.m.