Analyses that can be performed on a 2x2 contingency table.
Parameters: | table : array-like
shift_zeros : boolean
|
---|
Notes
The inference procedures used here are all based on a sampling model in which the units are independent and identically distributed, with each unit being classified with respect to two categorical variables.
Note that for the risk ratio, the analysis is not symmetric with respect to the rows and columns of the contingency table. The two rows define population subgroups, column 0 is the number of ‘events’, and column 1 is the number of ‘non-events’.
Attributes
log_oddsratio() | |
log_oddsratio_se() | |
oddsratio() | |
riskratio() | |
log_riskratio() | |
log_riskratio_se() |
Methods
chi2_contribs() | |
cumulative_log_oddsratios() | |
cumulative_oddsratios() | |
fittedvalues() | |
from_data(data[, shift_zeros]) | Construct a Table object from data. |
homogeneity([method]) | Compare row and column marginal distributions. |
independence_probabilities() | |
local_log_oddsratios() | |
local_oddsratios() | |
log_oddsratio() | |
log_oddsratio_confint([alpha, method]) | A confidence level for the log odds ratio. |
log_oddsratio_pvalue([null]) | P-value for a hypothesis test about the log odds ratio. |
log_oddsratio_se() | |
log_riskratio() | |
log_riskratio_confint([alpha, method]) | A confidence interval for the log risk ratio. |
log_riskratio_pvalue([null]) | p-value for a hypothesis test about the log risk ratio. |
log_riskratio_se() | |
marginal_probabilities() | |
oddsratio() | |
oddsratio_confint([alpha, method]) | A confidence interval for the odds ratio. |
oddsratio_pvalue([null]) | P-value for a hypothesis test about the odds ratio. |
resid_pearson() | |
riskratio() | |
riskratio_confint([alpha, method]) | A confidence interval for the risk ratio. |
riskratio_pvalue([null]) | p-value for a hypothesis test about the risk ratio. |
standardized_resids() | |
summary([alpha, float_format, method]) | Summarizes results for a 2x2 table analysis. |
symmetry([method]) | Test for symmetry of a joint distribution. |
test_nominal_association() | Assess independence for nominal factors. |
test_ordinal_association([row_scores, ...]) | Assess independence between two ordinal variables. |
Methods
chi2_contribs() | |
cumulative_log_oddsratios() | |
cumulative_oddsratios() | |
fittedvalues() | |
from_data(data[, shift_zeros]) | Construct a Table object from data. |
homogeneity([method]) | Compare row and column marginal distributions. |
independence_probabilities() | |
local_log_oddsratios() | |
local_oddsratios() | |
log_oddsratio() | |
log_oddsratio_confint([alpha, method]) | A confidence level for the log odds ratio. |
log_oddsratio_pvalue([null]) | P-value for a hypothesis test about the log odds ratio. |
log_oddsratio_se() | |
log_riskratio() | |
log_riskratio_confint([alpha, method]) | A confidence interval for the log risk ratio. |
log_riskratio_pvalue([null]) | p-value for a hypothesis test about the log risk ratio. |
log_riskratio_se() | |
marginal_probabilities() | |
oddsratio() | |
oddsratio_confint([alpha, method]) | A confidence interval for the odds ratio. |
oddsratio_pvalue([null]) | P-value for a hypothesis test about the odds ratio. |
resid_pearson() | |
riskratio() | |
riskratio_confint([alpha, method]) | A confidence interval for the risk ratio. |
riskratio_pvalue([null]) | p-value for a hypothesis test about the risk ratio. |
standardized_resids() | |
summary([alpha, float_format, method]) | Summarizes results for a 2x2 table analysis. |
symmetry([method]) | Test for symmetry of a joint distribution. |
test_nominal_association() | Assess independence for nominal factors. |
test_ordinal_association([row_scores, ...]) | Assess independence between two ordinal variables. |