Monte Carlo Adjusted Profile¶
- pypomp.mcap(parameter: ArrayLike, loglik: ArrayLike, *, level: float = 0.95, span: float = 0.75, n_grid: int = 1000, loess_degree: int = 2) MCAPResult[source]¶
Compute Monte Carlo-adjusted profile (MCAP) confidence intervals.
Constructs a profile likelihood confidence interval accommodating both Monte Carlo noise in the profile and statistical uncertainty in the likelihood function (Ionides et al. 2017 [1]).
- Parameters:
parameter (array-like) – Parameter values at which log-likelihoods were evaluated.
loglik (array-like) – Log-likelihood values corresponding to
parameter.level (float, optional) – Confidence level for the interval. Defaults to
0.95.span (float, optional) – Span parameter for the LOESS smoother. Defaults to
0.75.n_grid (int, optional) – Number of grid points for evaluating the smoothed log-likelihood. Defaults to
1000.loess_degree (int, optional) – Polynomial degree for the LOESS smoother. Defaults to
2.
- Returns:
Object containing the computed confidence interval and SE decomposition.
- Return type:
References
- class pypomp.mcap.MCAPResult(level: float, mle: float, ci: Tuple[float | None, float | None], delta: float, se_stat: float, se_mc: float, se_total: float, fit: Dict[str, NDArray[floating[Any]]], quadratic_max: float, quadratic_coef: Dict[str, float], vcov: NDArray[floating[Any]])[source]¶
Bases:
objectResults of a Monte Carlo adjusted profile (MCAP) analysis.
Attributes
- MCAPResult.mle: float¶
The maximum likelihood estimate of the focal parameter, taken as the argmax of the smoothed profile.
- MCAPResult.ci: Tuple[float | None, float | None]¶
The profile likelihood confidence interval (lower, upper).
- MCAPResult.delta: float¶
The log-likelihood threshold used to define the confidence interval, relative to the maximum.
- MCAPResult.se_total: float¶
The total standard error, calculated as the root sum of squares of se_stat and se_mc.
- MCAPResult.fit: Dict[str, NDArray[floating[Any]]]¶
A dictionary containing the grid of parameters (‘parameter’), the smoothed log-likelihood values (‘smoothed’), and the local quadratic fit values (‘quadratic’).