Python Forum

Full Version: retrieving pvalue from statsmodels results
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Please how can I retrieve on p-values from this

results = results.test_causality('Q50', ['Q95'], kind='f')
print results
# output:
Output:
<statsmodels.tsa.vector_ar.hypothesis_test_results.CausalityTestResults object. H_0: Q95 does not Granger-cause Q50: fail to reject at 5% significance level. Test statistic: 0.200, critical value: 3.851>, p-value: 0.655>
How can I copy only the p value?
Try results.pvalue
I tried but doesnt work
Never used statsmodels myself but from documentation:

test_causality returns CausalityTestResults object.

CausalityTestResults has method summary()
Staph Wrote:I tried but doesnt work
What's the error message?