Closed a-torgovitsky closed 4 years ago
I am updating the code for multiple tau and I am thinking what would be the best output in the following hypothetical example:
Hence, in the case of having multiple taus in dkqs
, should the code only run and print the results with tau = 0.1, 0.2 and 0.4, and then add a remark saying that tau = 0.5 and 0.9 are infeasible?
Thanks!
That sounds like a good solution to me!
Done! The code now allows for multiple taus. The following is a sample output with multiple taus:
Input (following the example file earlier)
rdkqs <- dkqs(data = data,
lpmodel = lpm,
beta.tgt = .3,
R = 100,
tau = c(.2, .5, 2, 10),
solver = "gurobi",
cores = 2,
progress = TRUE)
Output for print(rdkqs)
:
p-values:
tau p-value
0.2 0.29
0.5 0.31
1.0 0.39
The following taus from the input are infeasible: 2, 10
Output for summary(rdkqs)
:
p-values:
tau p-value
0.2 0.29
0.5 0.31
1.0 0.39
Test statistic: 99.35703
Solver used: gurobi
Number of cores used: 2
Maximum feasible tau: 1
The following taus from the input are infeasible: 2, 10
Thanks!
Looks good, but maybe to keep it more coherent, it would be better to add the infeasible ones also to the table with p-value listed as infeasible
Also, I don't think there is any need for the first
p-values:
in the top line
Done! The updated messages look like the followings:
Print:
tau p-value
0.2 0.29
0.5 0.31
1 0.39
2 infeasible
10 infeasible
Summary:
tau p-value
0.2 0.29
0.5 0.31
1 0.39
2 infeasible
10 infeasible
Maximum feasible tau: 1
Test statistic: 99.35703
Solver used: gurobi
Number of cores used: 2
Looks good!
Same as #25 with lambda for fsst.
Currently I get rather strange behavior: