conroylau / lpinfer

lpinfer: An R Package for Inference in Linear Programs
GNU General Public License v3.0
3 stars 5 forks source link

Why is the variable `p_sig` needed? #13

Closed a-torgovitsky closed 4 years ago

a-torgovitsky commented 4 years ago

A p-value is defined as: The smallest significance level \alpha for which the null hypothesis would be rejected. I don't understand why the number of decimal places comes into this. Determining the p--value should just be a matter of sorting the bootstrap results.

conroylau commented 4 years ago

Done - The reason that I had p_sig in the bootstrap is that I used the quantile() function to compute the p-value instead of sorting it. But I think it is not the most appropriate way because the quantile() function may interpolate two values, which may lead to an inaccurate estimate. Thus, the function has been updated.