Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooStats::NeymanConstruction Class Reference

NeymanConstruction is a concrete implementation of the NeymanConstruction interface that, as the name suggests, performs a NeymanConstruction.

It produces a RooStats::PointSetInterval, which is a concrete implementation of the ConfInterval interface.

The Neyman Construction is not a uniquely defined statistical technique, it requires that one specify an ordering rule or ordering principle, which is usually incoded by choosing a specific test statistic and limits of integration (corresponding to upper/lower/central limits). As a result, this class must be configured with the corresponding information before it can produce an interval. Common configurations, such as the Feldman-Cousins approach, can be enforced by other light weight classes.

The Neyman Construction considers every point in the parameter space independently, no assumptions are made that the interval is connected or of a particular shape. As a result, the PointSetInterval class is used to represent the result. The user indicate which points in the parameter space to perform the construction by providing a PointSetInterval instance with the desired points.

This class is fairly light weight, because the choice of parameter points to be considered is factorized and so is the creation of the sampling distribution of the test statistic (which is done by a concrete class implementing the DistributionCreator interface). As a result, this class basically just drives the construction by:

  • using a DistributionCreator to create the SamplingDistribution of a user- defined test statistic for each parameter point of interest,
  • defining the acceptance region in the data by finding the thresholds on the test statistic such that the integral of the sampling distribution is of the appropriate size and consistent with the limits of integration (eg. upper/lower/central limits),
  • and finally updating the PointSetInterval based on whether the value of the test statistic evaluated on the data are in the acceptance region.

Definition at line 36 of file NeymanConstruction.h.

Public Member Functions

 NeymanConstruction (RooAbsData &data, ModelConfig &model)
 NeymanConstruction();.
 
 ~NeymanConstruction () override
 default constructor if(fOwnsWorkspace && fWS) delete fWS; if(fConfBelt) delete fConfBelt;
 
void AdditionalNToysFactor (double fact)
 give user ability to ask for more toys
 
double ConfidenceLevel () const override
 Get the Confidence level for the test.
 
void CreateConfBelt (bool flag=true)
 should create confidence belt
 
ConfidenceBeltGetConfidenceBelt ()
 Get confidence belt. This requires that CreateConfBelt() has been called.
 
PointSetIntervalGetInterval () const override
 Main interface to get a ConfInterval (will be a PointSetInterval)
 
TestStatSamplerGetTestStatSampler (void)
 Returns instance of TestStatSampler.
 
TClassIsA () const override
 
void SaveBeltToFile (bool flag=true)
 save the confidence belt to a file
 
void SetConfidenceLevel (double cl) override
 set the confidence level for the interval (eg. 0.95 for a 95% Confidence Interval)
 
void SetData (RooAbsData &data) override
 Set the DataSet.
 
void SetLeftSideTailFraction (double leftSideFraction=0.)
 fLeftSideTailFraction*fSize defines lower edge of acceptance region.
 
void SetModel (const ModelConfig &model) override
 Set ModelConfig.
 
void SetParameterPointsToTest (RooAbsData &pointsToTest)
 User-defined set of points to test.
 
void SetTestSize (double size) override
 set the size of the test (rate of Type I error) ( Eg. 0.05 for a 95% Confidence Interval)
 
void SetTestStatSampler (TestStatSampler &sampler)
 in addition to interface we also need: Set the TestStatSampler (eg.
 
double Size () const override
 This class can make regularly spaced scans based on range stored in RooRealVars.
 
void Streamer (TBuffer &) override
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
void UseAdaptiveSampling (bool flag=true)
 adaptive sampling algorithm to speed up interval calculation
 
- Public Member Functions inherited from RooStats::IntervalCalculator
virtual ~IntervalCalculator ()
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 

Static Public Member Functions

static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from RooStats::IntervalCalculator
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 

Private Attributes

bool fAdaptiveSampling
 controls use of adaptive sampling algorithm
 
double fAdditionalNToysFactor
 give user ability to ask for more toys
 
ConfidenceBeltfConfBelt
 
bool fCreateBelt
 controls use if ConfidenceBelt should be saved to a TFile
 
RooAbsDatafData
 data set
 
double fLeftSideFraction
 
ModelConfigfModel
 
RooAbsDatafPointsToTest
 
bool fSaveBeltToFile
 controls use if ConfidenceBelt should be saved to a TFile
 
double fSize
 size of the test (eg. specified rate of Type I error)
 
TestStatSamplerfTestStatSampler
 

#include <RooStats/NeymanConstruction.h>

Inheritance diagram for RooStats::NeymanConstruction:
[legend]

Constructor & Destructor Documentation

◆ NeymanConstruction()

NeymanConstruction::NeymanConstruction ( RooAbsData data,
ModelConfig model 
)

NeymanConstruction();.

default constructor

Definition at line 79 of file NeymanConstruction.cxx.

◆ ~NeymanConstruction()

NeymanConstruction::~NeymanConstruction ( )
override

default constructor if(fOwnsWorkspace && fWS) delete fWS; if(fConfBelt) delete fConfBelt;

Definition at line 104 of file NeymanConstruction.cxx.

Member Function Documentation

◆ AdditionalNToysFactor()

void RooStats::NeymanConstruction::AdditionalNToysFactor ( double  fact)
inline

give user ability to ask for more toys

Definition at line 92 of file NeymanConstruction.h.

◆ Class()

static TClass * RooStats::NeymanConstruction::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

static const char * RooStats::NeymanConstruction::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

static constexpr Version_t RooStats::NeymanConstruction::Class_Version ( )
inlinestaticconstexpr
Returns
Version of this class

Definition at line 123 of file NeymanConstruction.h.

◆ ConfidenceLevel()

double RooStats::NeymanConstruction::ConfidenceLevel ( ) const
inlineoverridevirtual

Get the Confidence level for the test.

Implements RooStats::IntervalCalculator.

Definition at line 72 of file NeymanConstruction.h.

◆ CreateConfBelt()

void RooStats::NeymanConstruction::CreateConfBelt ( bool  flag = true)
inline

should create confidence belt

Definition at line 100 of file NeymanConstruction.h.

◆ DeclFileName()

static const char * RooStats::NeymanConstruction::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 123 of file NeymanConstruction.h.

◆ GetConfidenceBelt()

ConfidenceBelt * RooStats::NeymanConstruction::GetConfidenceBelt ( )
inline

Get confidence belt. This requires that CreateConfBelt() has been called.

Definition at line 86 of file NeymanConstruction.h.

◆ GetInterval()

PointSetInterval * NeymanConstruction::GetInterval ( ) const
overridevirtual

Main interface to get a ConfInterval (will be a PointSetInterval)

Main interface to get a RooStats::ConfInterval.

It constructs a RooStats::SetInterval.

Implements RooStats::IntervalCalculator.

Definition at line 111 of file NeymanConstruction.cxx.

◆ GetTestStatSampler()

TestStatSampler * RooStats::NeymanConstruction::GetTestStatSampler ( void  )
inline

Returns instance of TestStatSampler.

Use to change properties of TestStatSampler, e.g. GetTestStatSampler.SetTestSize(double size);

Definition at line 104 of file NeymanConstruction.h.

◆ IsA()

TClass * RooStats::NeymanConstruction::IsA ( ) const
inlineoverridevirtual
Returns
TClass describing current object

Reimplemented from RooStats::IntervalCalculator.

Definition at line 123 of file NeymanConstruction.h.

◆ SaveBeltToFile()

void RooStats::NeymanConstruction::SaveBeltToFile ( bool  flag = true)
inline

save the confidence belt to a file

Definition at line 95 of file NeymanConstruction.h.

◆ SetConfidenceLevel()

void RooStats::NeymanConstruction::SetConfidenceLevel ( double  cl)
inlineoverridevirtual

set the confidence level for the interval (eg. 0.95 for a 95% Confidence Interval)

Implements RooStats::IntervalCalculator.

Definition at line 83 of file NeymanConstruction.h.

◆ SetData()

void RooStats::NeymanConstruction::SetData ( RooAbsData data)
inlineoverridevirtual

Set the DataSet.

Implements RooStats::IntervalCalculator.

Definition at line 78 of file NeymanConstruction.h.

◆ SetLeftSideTailFraction()

void RooStats::NeymanConstruction::SetLeftSideTailFraction ( double  leftSideFraction = 0.)
inline

fLeftSideTailFraction*fSize defines lower edge of acceptance region.

Unified limits use 0, central limits use 0.5, for upper/lower limits it is 0/1 depends on sign of test statistic w.r.t. parameter

Definition at line 54 of file NeymanConstruction.h.

◆ SetModel()

void RooStats::NeymanConstruction::SetModel ( const ModelConfig model)
inlineoverridevirtual

Set ModelConfig.

Implements RooStats::IntervalCalculator.

Definition at line 75 of file NeymanConstruction.h.

◆ SetParameterPointsToTest()

void RooStats::NeymanConstruction::SetParameterPointsToTest ( RooAbsData pointsToTest)
inline

User-defined set of points to test.

Definition at line 57 of file NeymanConstruction.h.

◆ SetTestSize()

void RooStats::NeymanConstruction::SetTestSize ( double  size)
inlineoverridevirtual

set the size of the test (rate of Type I error) ( Eg. 0.05 for a 95% Confidence Interval)

Implements RooStats::IntervalCalculator.

Definition at line 81 of file NeymanConstruction.h.

◆ SetTestStatSampler()

void RooStats::NeymanConstruction::SetTestStatSampler ( TestStatSampler sampler)
inline

in addition to interface we also need: Set the TestStatSampler (eg.

ToyMC or FFT, includes choice of TestStatistic)

Definition at line 50 of file NeymanConstruction.h.

◆ Size()

double RooStats::NeymanConstruction::Size ( ) const
inlineoverridevirtual

This class can make regularly spaced scans based on range stored in RooRealVars.

Choose number of steps for a rastor scan (common for each dimension) void SetNumSteps(Int_t); This class can make regularly spaced scans based on range stored in RooRealVars. Choose number of steps for a rastor scan (specific for each dimension) void SetNumSteps(std::map<RooAbsArg, Int_t>) Get the size of the test (eg. rate of Type I error)

Implements RooStats::IntervalCalculator.

Definition at line 69 of file NeymanConstruction.h.

◆ Streamer()

void RooStats::NeymanConstruction::Streamer ( TBuffer )
overridevirtual

Reimplemented from RooStats::IntervalCalculator.

◆ StreamerNVirtual()

void RooStats::NeymanConstruction::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 123 of file NeymanConstruction.h.

◆ UseAdaptiveSampling()

void RooStats::NeymanConstruction::UseAdaptiveSampling ( bool  flag = true)
inline

adaptive sampling algorithm to speed up interval calculation

Definition at line 89 of file NeymanConstruction.h.

Member Data Documentation

◆ fAdaptiveSampling

bool RooStats::NeymanConstruction::fAdaptiveSampling
private

controls use of adaptive sampling algorithm

Definition at line 117 of file NeymanConstruction.h.

◆ fAdditionalNToysFactor

double RooStats::NeymanConstruction::fAdditionalNToysFactor
private

give user ability to ask for more toys

Definition at line 118 of file NeymanConstruction.h.

◆ fConfBelt

ConfidenceBelt* RooStats::NeymanConstruction::fConfBelt
private

Definition at line 116 of file NeymanConstruction.h.

◆ fCreateBelt

bool RooStats::NeymanConstruction::fCreateBelt
private

controls use if ConfidenceBelt should be saved to a TFile

Definition at line 120 of file NeymanConstruction.h.

◆ fData

RooAbsData& RooStats::NeymanConstruction::fData
private

data set

Definition at line 110 of file NeymanConstruction.h.

◆ fLeftSideFraction

double RooStats::NeymanConstruction::fLeftSideFraction
private

Definition at line 115 of file NeymanConstruction.h.

◆ fModel

ModelConfig& RooStats::NeymanConstruction::fModel
private

Definition at line 111 of file NeymanConstruction.h.

◆ fPointsToTest

RooAbsData* RooStats::NeymanConstruction::fPointsToTest
private

Definition at line 114 of file NeymanConstruction.h.

◆ fSaveBeltToFile

bool RooStats::NeymanConstruction::fSaveBeltToFile
private

controls use if ConfidenceBelt should be saved to a TFile

Definition at line 119 of file NeymanConstruction.h.

◆ fSize

double RooStats::NeymanConstruction::fSize
private

size of the test (eg. specified rate of Type I error)

Definition at line 109 of file NeymanConstruction.h.

◆ fTestStatSampler

TestStatSampler* RooStats::NeymanConstruction::fTestStatSampler
private

Definition at line 113 of file NeymanConstruction.h.

Libraries for RooStats::NeymanConstruction:

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