Closed a-torgovitsky closed 4 years ago
Done! Just updated the invertci
function with init.lb
and init.ub
that represent the initial brackets.
Do you think the following assignments are appropriate if init.lb and init.ub are not both vectors? |
Scenario | lb initial bracket assignment |
ub initial bracket assignment |
---|---|---|---|
init.lb = [a, b] and init.ub is a scalar |
[a, b] |
[a, init.ub] |
|
init.lb is a scalar and init.ub = [c, d] |
[init.lb, d] |
[c, d] |
|
init.lb and init.ub are scalars |
[init.lb, init.ub] |
[init.lb, init.ub] |
|
init.lb is a scalar and init.ub is NULL |
[init.lb, logical.ub] |
[init.lb, logical.ub] |
|
init.lb is NULL and init.ub is a scalar |
[logical.lb, init.ub] |
[logical.lb, init.ub] |
|
init.lb and init.ub are both NULL |
[logical.lb, logical.ub] |
[logical.lb, logical.ub] |
(where logical.lb
and logical.ub
are the logical lower and upper bounds respectively).
In addition, as mentioned in #79, when chorussell
is used in invertci
, the confidence intervals are constructed using the chorussell
procedure directly.
Hence, init.lb
and init.ub
will be ignored if f = chorussell
in invertci
.
On the other hand, I have also updated the sample code in the example
folder to reflect the change.
Thanks!
Do you think the following assignments are appropriate if init.lb and init.ub are not both vectors?
I think that's too complicated and I can't imagine relevant use cases where any of the first five rows would be important. The only thing we want to accept from the user for each of init.lb
and init.ub
is the default (NULL) or a vector of two elements.
By the way, what happens currently if the logical.lb
or logical.ub
is turns out to be +/- Infinity?
In this case I think we should error and tell the user that they need to pass init.lb
and init.ub
explicitly.
Just updated the invertci
procedure:
Error: The logical upper and lower bounds are infinite. Please provide the corresponding initial brackets.
NULL
or a vector of 2 elements.
In case one of the initial brackets is NULL
and the other is not, may I know is the following appropriate?Scenario | lb initial bracket assignment |
ub initial bracket assignment |
---|---|---|
init.lb = [a, b] and init.ub is NULL |
[a, b] |
[a, logical.ub] |
init.lb is NULL and init.ub = [c, d] |
[logical.lb, d] |
[c, d] |
Thanks!
Yes I think that's reasonable. Thanks!
This is what is written in the README.md:
Let's take a step back here.
What we want here is for the user to be able to specify an initial bracket. This has nothing to do with the "logical lower bound" or "maximum possible lower bound." We use the logical lower bound if the user does not pass one only because that's our best guess.
I think we need to re-design this to be more clear by removing these four options and replacing them with:
init.lb
a vector with two objectsinit.ub
a vector with two objectsThese are just initial brackets. If the user passes initial brackets, then we use them. If they don't, then we continue doing what we are doing now and infer them.