Logo ROOT   6.08/07
Reference Guide
List of all members | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
RooStats::ProfileLikelihoodCalculator Class Reference

ProfileLikelihoodCalculator is a concrete implementation of CombinedCalculator (the interface class for a tools which can produce both RooStats HypoTestResults and ConfIntervals).

The tool uses the profile likelihood ratio as a test statistic, and assumes that Wilks' theorem is valid. Wilks' theorem states that -2* log (profile likelihood ratio) is asymptotically distributed as a chi^2 distribution with N-dof, where N is the number of degrees of freedom. Thus, p-values can be constructed and the profile likelihood ratio can be used to construct a LikelihoodInterval. (In the future, this class could be extended to use toy Monte Carlo to calibrate the distribution of the test statistic).

Usage: It uses the interface of the CombinedCalculator, so that it can be configured by specifying:

a model common model (eg. a family of specific models which includes both the null and alternate),
a data set,
a set of parameters of interest. The nuisance parameters will be all other parameters of the model
a set of parameters of which specify the null hypothesis (including values and const/non-const status)

The interface allows one to pass the model, data, and parameters either directly or via a ModelConfig class. The alternate hypothesis leaves the parameter free to take any value other than those specified by the null hypotesis. There is therefore no need to specify the alternate parameters.

After configuring the calculator, one only needs to ask GetHypoTest() (which will return a HypoTestResult pointer) or GetInterval() (which will return an ConfInterval pointer).

This calculator can work with both one-dimensional intervals or multi-dimensional ones (contours)

Note that for hypothesis tests, it is oftern better to use the RooStats::AsymptoricCalculator class, which can compute in addition the expected p-value using an Asimov data set.

Definition at line 52 of file ProfileLikelihoodCalculator.h.

Public Member Functions

 ProfileLikelihoodCalculator ()
 Default constructor (needed for I/O) More...
 
 ProfileLikelihoodCalculator (RooAbsData &data, RooAbsPdf &pdf, const RooArgSet &paramsOfInterest, Double_t size=0.05, const RooArgSet *nullParams=0)
 Constructor from data, from a full model pdf describing both parameter of interest and nuisance parameters and from the set specifying the parameter of interest (POI). More...
 
 ProfileLikelihoodCalculator (RooAbsData &data, ModelConfig &model, Double_t size=0.05)
 Constructor from data and a model configuration If the ModelConfig defines a prior pdf for any of the parameters those will be included as constrained terms in the likelihood function. More...
 
virtual ~ProfileLikelihoodCalculator ()
 destructor cannot delete prod pdf because it will delete all the composing pdf's if (fOwnPdf) delete fPdf; fPdf = 0; More...
 
virtual HypoTestResultGetHypoTest () const
 Return the hypothesis test result obtained from the likelihood ratio of the maximum likelihood value with the null parameters fixed to their values, with respect keeping all parameters floating (global maximum likelihood value). More...
 
virtual LikelihoodIntervalGetInterval () const
 Return a likelihood interval. More...
 
- Public Member Functions inherited from RooStats::CombinedCalculator
 CombinedCalculator ()
 
 CombinedCalculator (RooAbsData &data, RooAbsPdf &pdf, const RooArgSet &paramsOfInterest, Double_t size=0.05, const RooArgSet *nullParams=0, const RooArgSet *altParams=0, const RooArgSet *nuisParams=0)
 
 CombinedCalculator (RooAbsData &data, const ModelConfig &model, Double_t size=0.05)
 constructor from data and model configuration More...
 
virtual ~CombinedCalculator ()
 destructor. More...
 
virtual Double_t ConfidenceLevel () const
 Get the Confidence level for the test. More...
 
virtual void SetAlternateModel (const ModelConfig &)
 
virtual void SetAlternateParameters (const RooArgSet &set)
 set parameter values for the alternate if using a common PDF More...
 
virtual void SetConditionalObservables (const RooArgSet &set)
 set conditional observables needed for computing the NLL More...
 
virtual void SetConfidenceLevel (Double_t cl)
 set the confidence level for the interval (eg. 0.95 for a 95% Confidence Interval) More...
 
virtual void SetData (RooAbsData &data)
 Set the DataSet, add to the the workspace if not already there. More...
 
virtual void SetModel (const ModelConfig &model)
 set the model (in this case can set only the parameters for the null hypothesis) More...
 
virtual void SetNuisanceParameters (const RooArgSet &set)
 specify the nuisance parameters (eg. the rest of the parameters) More...
 
virtual void SetNullModel (const ModelConfig &)
 
virtual void SetNullParameters (const RooArgSet &set)
 set parameter values for the null if using a common PDF More...
 
virtual void SetParameters (const RooArgSet &set)
 specify the parameters of interest in the interval More...
 
virtual void SetPdf (RooAbsPdf &pdf)
 Set the Pdf. More...
 
virtual void SetTestSize (Double_t size)
 set the size of the test (rate of Type I error) ( Eg. 0.05 for a 95% Confidence Interval) More...
 
virtual Double_t Size () const
 Get the size of the test (eg. rate of Type I error) More...
 
- Public Member Functions inherited from RooStats::IntervalCalculator
virtual ~IntervalCalculator ()
 
- Public Member Functions inherited from RooStats::HypoTestCalculator
virtual ~HypoTestCalculator ()
 
virtual void SetCommonModel (const ModelConfig &model)
 

Protected Member Functions

RooAbsRealDoGlobalFit () const
 
void DoReset () const
 
- Protected Member Functions inherited from RooStats::CombinedCalculator
RooAbsDataGetData () const
 
RooAbsPdfGetPdf () const
 

Static Protected Member Functions

static RooFitResultDoMinimizeNLL (RooAbsReal *nll)
 

Protected Attributes

RooFitResultfFitResult
 
bool fGlobalFitDone
 
- Protected Attributes inherited from RooStats::CombinedCalculator
RooArgSet fAlternateParams
 
RooArgSet fConditionalObs
 
RooAbsDatafData
 
RooArgSet fNuisParams
 
RooArgSet fNullParams
 
RooAbsPdffPdf
 
RooArgSet fPOI
 
Double_t fSize
 

#include <RooStats/ProfileLikelihoodCalculator.h>

Inheritance diagram for RooStats::ProfileLikelihoodCalculator:
[legend]

Constructor & Destructor Documentation

◆ ProfileLikelihoodCalculator() [1/3]

ProfileLikelihoodCalculator::ProfileLikelihoodCalculator ( )

Default constructor (needed for I/O)

default constructor

Definition at line 83 of file ProfileLikelihoodCalculator.cxx.

◆ ProfileLikelihoodCalculator() [2/3]

ProfileLikelihoodCalculator::ProfileLikelihoodCalculator ( RooAbsData data,
RooAbsPdf pdf,
const RooArgSet paramsOfInterest,
Double_t  size = 0.05,
const RooArgSet nullParams = 0 
)

Constructor from data, from a full model pdf describing both parameter of interest and nuisance parameters and from the set specifying the parameter of interest (POI).

There is no need to specify the nuisance parameters since they are all other parameters of the model. When using the calculator for performing an hypothesis test one needs to provide also a snapshot (a copy) defining the null parameters and their value. There is no need to pass the alternate parameters. These will be obtained by the value maximazing the likelihood function

Definition at line 88 of file ProfileLikelihoodCalculator.cxx.

◆ ProfileLikelihoodCalculator() [3/3]

ProfileLikelihoodCalculator::ProfileLikelihoodCalculator ( RooAbsData data,
ModelConfig model,
Double_t  size = 0.05 
)

Constructor from data and a model configuration If the ModelConfig defines a prior pdf for any of the parameters those will be included as constrained terms in the likelihood function.

Definition at line 97 of file ProfileLikelihoodCalculator.cxx.

◆ ~ProfileLikelihoodCalculator()

ProfileLikelihoodCalculator::~ProfileLikelihoodCalculator ( )
virtual

destructor cannot delete prod pdf because it will delete all the composing pdf's if (fOwnPdf) delete fPdf; fPdf = 0;

Definition at line 113 of file ProfileLikelihoodCalculator.cxx.

Member Function Documentation

◆ DoGlobalFit()

RooAbsReal * ProfileLikelihoodCalculator::DoGlobalFit ( ) const
protected

Definition at line 124 of file ProfileLikelihoodCalculator.cxx.

◆ DoMinimizeNLL()

RooFitResult * ProfileLikelihoodCalculator::DoMinimizeNLL ( RooAbsReal nll)
staticprotected

Definition at line 168 of file ProfileLikelihoodCalculator.cxx.

◆ DoReset()

void ProfileLikelihoodCalculator::DoReset ( ) const
protected

Definition at line 117 of file ProfileLikelihoodCalculator.cxx.

◆ GetHypoTest()

HypoTestResult * ProfileLikelihoodCalculator::GetHypoTest ( ) const
virtual

Return the hypothesis test result obtained from the likelihood ratio of the maximum likelihood value with the null parameters fixed to their values, with respect keeping all parameters floating (global maximum likelihood value).

Main interface to get a HypoTestResult.

It does two fits: the first lets the null parameters float, so it's a maximum likelihood estimate the second is to the null (fixing null parameters to their specified values): eg. a conditional maximum likelihood the ratio of the likelihood at the conditional MLE to the MLE is the profile likelihood ratio. Wilks' theorem is used to get p-values

Implements RooStats::CombinedCalculator.

Definition at line 295 of file ProfileLikelihoodCalculator.cxx.

◆ GetInterval()

LikelihoodInterval * ProfileLikelihoodCalculator::GetInterval ( ) const
virtual

Return a likelihood interval.

Main interface to get a RooStats::ConfInterval.

A global fit to the likelihood is performed and the interval is constructed using the the profile likelihood ratio function of the POI

It constructs a profile likelihood ratio and uses that to construct a RooStats::LikelihoodInterval.

Implements RooStats::CombinedCalculator.

Definition at line 219 of file ProfileLikelihoodCalculator.cxx.

Member Data Documentation

◆ fFitResult

RooFitResult* RooStats::ProfileLikelihoodCalculator::fFitResult
mutableprotected

Definition at line 100 of file ProfileLikelihoodCalculator.h.

◆ fGlobalFitDone

bool RooStats::ProfileLikelihoodCalculator::fGlobalFitDone
mutableprotected

Definition at line 101 of file ProfileLikelihoodCalculator.h.


The documentation for this class was generated from the following files: