conroylau / lpinfer

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

fsst: Allow the user to pass multiple "lambdas" #25

Closed a-torgovitsky closed 4 years ago

a-torgovitsky commented 4 years ago

Many of the calculations do not depend on lambda. So this is desirable for computational speed when checking different values of lambda.

The return will have a different p--value for each value of lambda.

conroylau commented 4 years ago

I see, sure no problem. In returning the p-values, which of the following ways do you think is better?

Thanks!

a-torgovitsky commented 4 years ago

I think a data.frame is probably better!

conroylau commented 4 years ago

Done! Now users can pass multiple lambdas to fsst.

A sample output is as follows:

Test statistic: 0.61354.             
   - Range component: 0.23877
   - Cone component: 0.61354
p-values:
     lambda p-value
     0.1    0.92
     0.001  0.95
Number of cores used: 1

The user can also retrieve the p-values as a data.frame.

Thanks!

a-torgovitsky commented 4 years ago

Looks great, good job!