Fitting a model with a discrete parameter (as a 2D trinomial)

Dear all,

I would like to fit a 2D histogram where bins represents integer (x,y) values with a discrete model, namely a multivariate binomial with 2 variable, so a “trinomial”.
Something like:

auto Trinomial = [](unsigned int x, unsigned int y,
                    unsigned int N, double px, double py) {
  return TMath::Exp( TMath::LnGamma(N+1) - TMath::LnGamma(x+1) - TMath::LnGamma(y+1) 
      - TMath::LnGamma(N-x-y+1) + x*TMath::Log(px) 
      + y*TMath::Log(py) + (N-x-y)*TMath::Log(1-px-py) ); 
}

or the same with a TF1 for a Chi2 fit (so with the extra normalization parameter):

TF2 f2trinomial("f2trinomial","TMath::Exp( [A] +  TMath::LnGamma(TMath::Floor([N])+1) ...etc as above...", etc.. )

The question is if the minimizer can deal with the integer parameter N, i.e. what is happening when a step size on this parameter smaller than 1 is attempted.
Is it possible to specify a minimum step size for some parameter and in general the various ROOT minimizers are suitable for these cases or should I use a different approach?

Best,
Matteo


ROOT Version: 6.16
Platform: Debian 9
Compiler: gcc 6.3


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.