You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix package extensions; Clean up tests; Remove use of threadid; Move figures into docs folder; Add a better, shorter, PDE example; remove GeneralLazyBufferCache (#87)
This package defines the routines required for computing maximum likelihood estimates and profile likelihoods. The optimisation routines are built around the [Optimization.jl](https://github.com/SciML/Optimization.jl) interface, allowing us to e.g. easily switch between algorithms, between finite differences and automatic differentiation, and it allows for constraints to be defined with ease. Below we list the definitions we are using for likelihoods and profile likelihoods. This code works for univariate and bivariate profiles.
Copy file name to clipboardExpand all lines: docs/src/index.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -12,4 +12,4 @@ From Wilk's theorem, we know that $2\hat{\ell}\_p(\boldsymbol\theta \mid \boldsy
12
12
13
13
We compute the profile log-likelihood in this package by starting at the MLE, and stepping left/right until we reach a given threshold. The code is iterative to not waste time in so much of the parameter space. In the bivariate case, we start at the MLE and expand outwards in layers. This implementation is described in the documentation.
14
14
15
-
More detail about the methods we use in this package is given in the sections in the sidebar, with extra detail in the tests.
15
+
More detail about the methods we use in this package is given in the sections in the sidebar, with extra detail in the tests. All of the examples in the sidebar use a Gaussian likelihood, but of course the tools here work for any likelihood problem (e.g. some good examples that might be good to show are the Poisson problems [here](https://www.slac.stanford.edu/econf/C030908/papers/THAT001.pdf)).
Importantly, `loglik` in this case is now a function of the form `ℓ(θ, p, integrator)`, where `integrator` is the same integrator as in the integrator interface from DifferentialEquations.jl; see the documentation at DifferentialEquations.jl for more detail on using the integrator. Furthermore, `ode_function` is the function for the ODE, `u₀` its initial condition, and `tspan` its time span. Additionally, the parameters for the `ode_function` (e.g. the `p` in `ode_function(du, u, p, t)` or `ode_function(u, p, t)`) can be passed using the keyword argument `ode_parameters`. The algorithm used to solve the differential equation is passed with `ode_alg`, and lastly any additional keyword arguments for solving the problem are to be passed through `ode_kwargs`.
28
28
29
-
There is also a method that makes it easier to use automatic differentiation when considering ODE problems by using a `GeneralLazyBufferCache` from PreallocationTools.jl - see Example V.
30
-
31
29
The full docstrings for the methods available are given in the sidebar.
32
30
33
31
## LikelihoodSolution: Obtaining an MLE
@@ -103,11 +101,10 @@ The full docstring for `get_prediction_intervals` is given in the sidebar.
103
101
We provide a function `plot_profiles` that can be useful for plotting profile likelihoods. It requires that you have done
104
102
105
103
```julia
106
-
using CairoMakie
107
-
using LaTeXString
104
+
using CairoMakie # (or any other Makie backend)
108
105
```
109
106
110
-
(else the function does not exist, thanks to Requires.jl). A full description of this function is given in the corresponding docstring in the sidebar.
107
+
(else the function does not exist, thanks to Requires.jl and package extensions from Julia v1.9). A full description of this function is given in the corresponding docstring in the sidebar.
111
108
112
109
## GridSearch
113
110
@@ -123,4 +120,4 @@ grid_search(prob::LikelihoodProblem, grid::AbstractGrid; save_vals=Val(false), p
123
120
124
121
Here, `grid` could be either a `RegularGrid` or an `IrregularGrid`. You can set `save_vals=Val(true)` if you want an array with all the likelihood function values, `Val(false)` otherwise. To enable multithreading, allowing for the evaluation of the function across different points via multiple threads, set `parallel=Val(true)`, otherwise leave it as `Val(false)`. The result of this grid search, if `save_vals=Val(true)`, will be `(sol, f_vals)`, where `sol` is a likelihood solution giving the parameters that gave to the highest likelihood, and `f_res` is the array of likelihoods at the corresponding parameters. If `save_vals=Val(false)`, only `sol` is returned.
125
122
126
-
More example is given in the examples, and complete docstrings are provided in the sidebar.
123
+
More detail is given in the examples, and complete docstrings are provided in the sidebar.
0 commit comments