Fix RegressionResult.bayesfactor_beta_zero for categorical terms
This commit is contained in:
parent
78944c7966
commit
4340be165b
@ -145,10 +145,14 @@ class RegressionResult:
|
||||
"""
|
||||
Compute Bayes factor testing the hypothesis that the given beta is 0
|
||||
Requires statsmodels regression
|
||||
|
||||
term: Raw name (from statsmodels, available via RegressionResult.raw_result) of term to be tested
|
||||
"""
|
||||
|
||||
# FIXME: Allow specifying our renamed terms
|
||||
|
||||
# Get parameters required for AFBF
|
||||
params = pd.Series({term.raw_name.replace('[', '_').replace(']', '_'): term.beta.point for term in self.terms.values()})
|
||||
params = pd.Series({raw_name.replace('[', '_').replace(']', '_'): beta for raw_name, beta in self.raw_result.params.items()})
|
||||
cov = self.raw_result.cov_params()
|
||||
|
||||
# Compute BF matrix
|
||||
|
Loading…
Reference in New Issue
Block a user