Batman

Batman.BatmanModule

Batman

Julia library designed to build statistical models with associated systematic uncertainties and provide inference into particular parameters of interest. Both Bayesian and Frequentist analysis are supported.

source
Batman.ModelType

abstract type Model

Models hold the parameters of interest and the associated likelihood/cost functions used in optimization. Individual models should be derived from this base object.

source
Batman.NLogLikelihoodType

NLogLikelihood(pf::Array{NLogPDF})

Given an array of NLogPDF, a complete negative log-likelihood function is contructed which can then be passed to a minimizer.

source
Batman.NLogPDFType

NLogPDF(f::String, p::Variable...)

Negative log PDF used when contructing the complete likelihood function. The NLogPDF should have a unique name f::String.

source
Batman.ResultsType

Results

Created upon optimizing a model, contains the model and all of its parameters as well as the optimized results found by minimizing the cost function.

source
Batman.add_datasetMethod

@add_dataset(name, df::DataFrame)

Introduce a new dataset into the namespace at read-time.

source
Batman.logpoissonMethod

logpoisson(n, x...)

\[ λ > 0 \ λ = sum([x...]) λ - n*log(λ) + n*log(n) - n\]

math

source
Batman.optimize_model!Method

optimizemodel!(m::Model, nll::NLogLikelihood; lowerbounds=nothing, upper_bounds=nothing)

Currently NLopt is used for minimizing the objective function. optimizemodel! produces the objective function from the given NLogLikelihood which is then passed to NLopt to be minimized. optimizemodel! returns a set of Results.

source
Batman.@addfunctionMacro

@addfunction f

Using @addfunction will write in a new function into the current namespace at read-time.

Examples

addfunction lognormalconstraint(x, μ, σ) = (x-μ)^2/2/σ
source