pastas.solver.least_squares.LeastSquaresBase.ci_block_response#

pastas.solver.least_squares.LeastSquaresBase.ci_block_response(name: str, n: int = 1000, alpha: float = 0.05, max_iter: int = 10, **kwargs) pandas.DataFrame#

Calculate the confidence interval for the block response.

Parameters:
  • name (str) – Name of the block response for which to calculate the confidence interval.

  • n (int, optional) – Number of random samples drawn from the bivariate normal distribution to compute the confidence interval. Default is 1000.

  • alpha (float, optional) – Significance level for the confidence interval. Default is 0.05, which corresponds to a 95% confidence interval.

  • max_iter (int, optional) – Maximum number of iterations for truncated multivariate sampling, default is 10. Increase this value if number of accepted parameter samples is lower than n.

  • **kwargs – Additional keyword arguments are passed to the ml.get_block_response() method.

Returns:

  • data (Pandas.DataFrame) – DataFrame of length number of observations and two columns labeled 0.025 and 0.975 (numerical values) containing the 2.5% and 97.5% interval (for alpha=0.05)

  • **kwargs – Additional keyword arguments are passed to the ml.get_block_response() method.

Notes

The confidence interval shows the uncertainty in the simulation due to parameter uncertainty. In other words, there is a 95% probability that the true best-fit line for the observed data lies within the 95% confidence interval.