posthoc_factor_test takes a eh_test_subtype fit and returns an overall p-value for a specified factor variable.

posthoc_factor_test(fit, factor, nlevels)

Arguments

fit

the resulting eh_test_subtype fit.

factor

is the name of the factor variable of interest, supplied in quotes, e.g. factor = "race". Only supports a single factor.

nlevels

is the number of levels the factor variable in factor has.

Value

Returns a list.

pval is a formatted p-value.

pval_raw is the raw, unformatted p-value.

Author

Emily C Zabor zabore@mskcc.org