conroylau / lpinfer

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

Cannot set tau equal to 0 in DKQS #40

Closed a-torgovitsky closed 4 years ago

a-torgovitsky commented 4 years ago
rdkqs <- dkqs(data = data,
              lpmodel = lpm,
              beta.tgt = .3,
              R = 100,
              tau = 0,
              solver = "gurobi",
              cores = 1,
              progress = TRUE)

Error in if (tau > tau.return$objval) { : argument is of length zero
conroylau commented 4 years ago

This problem has been solved in the most recent version of dkqs - I think this error was due to the bug in the LP formulation for finding the maximum tau. If I set the seed as 1 and run the above code, i.e.

set.seed(1)
rdkqs <- dkqs(data = data,
              lpmodel = lpm,
              beta.tgt = .3,
              R = 100,
              tau = 0,
              solver = "gurobi",
              cores = 1,
              progress = TRUE)

I get p-value of 0.33. Thanks!