conroylau / lpinfer

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

The default tau in DKQS should not be .5 #38

Closed a-torgovitsky closed 4 years ago

a-torgovitsky commented 4 years ago

https://github.com/conroylau/lpinfer/blob/4eb403340a3db6c0c1e9cebe34b5ee735cd981ca/R/dkqs.R#L54

It should be the maximum value possible.

Actually, I am not sure what is going on here:

rdkqs <- dkqs(data = data,
              lpmodel = lpm,
              beta.tgt = .3,
              R = 100,
              solver = "gurobi",
              cores = 1,
              progress = TRUE)
print(rdkqs)
Test statistic: 99.35703.             
p-value: 0.35.
Value of tau used: 0.5.
Solver used: gurobi.
Number of cores used: 1.

Default tau was .5, so that makes sense.

rdkqs <- dkqs(data = data,
              lpmodel = lpm,
              beta.tgt = .3,
              R = 100,
              solver = "gurobi",
              cores = 1,
              tau = 20,
              progress = TRUE)
print(rdkqs)
Test statistic: 99.35703.             
p-value: 0.31.
Value of tau used: 0.05.
Solver used: gurobi.
Number of cores used: 1.

So tau = 20 was not feasible? Then we go with the largest feasible one, which is .05? But then why was tau = .5 used in the previous?

conroylau commented 4 years ago

Sorry for the confusion in the above output. I have fixed a bug in the function for finding the maximum tau for the LP where I find that the input tau is affecting the LP, so the optimal tau for both sample outputs that you have are different. The bug has been fixed now. Thanks!