while playing around with the RooStats tutorial rs101_limitexample.C in Root 5.22.04, I noticed that the method ProfileLikelihoodCalculator::SetConfidenceLevel()
does not seem to have any effect on the intervals delivered by ProfileLikelihoodCalculator, it always returns the 95% interval.
For the FeldmanCousins calculator this functionality seems to work.
Is this the correct behaviour of the class or a bug?
the method should have an influence on the interval returned. You are using however an old release, I would recommend you to try a more recent version like 5.25.02
I’ve tried with 5.25.02 now and there is no difference.
The modification I do to rs101_limitexample.C is shown below:
...
// First, let's use a Calculator based on the Profile Likelihood Ratio
ProfileLikelihoodCalculator plc(*data, *modelWithConstraints, paramOfInterest);
plc.SetConfidenceLevel(0.68); // <--- THIS IS THE LINE I ADD
plc.SetTestSize(.1);
ConfInterval* lrint = plc.GetInterval(); // that was easy.
...
Hi,
the reason is you are calling both SetConfidenceLevel and SetTestSize.
They are doing the same thing, the test size is = 1. - ConfidenceLevel
In your case, any value set in SetConfidenceLevel will be changed by the value you are setting in SetTestSize.
Just remove the line
Ok, that explains the issue.
So, I assume that SetTestSize and SetConfidenceLevel are completely equivalent except that the arguments are 0.1 in one case and 0.9 in the other case for a 90% confidence interval.
It seems like the documentation for this function is a bit buggy. Compare