pastas.plotting.plots.diagnostics ================================= .. py:function:: pastas.plotting.plots.diagnostics(series: pandas.Series, sim: pandas.Series | None = None, alpha: float = 0.05, bins: int = 50, acf_options: dict | None = None, figsize: tuple = (10, 5), fig: pastas.typing.Figure | None = None, heteroscedasicity: bool = True, **kwargs) -> pastas.typing.Axes Plot that helps in diagnosing basic model assumptions. :param series: Pandas Series with the residual time series to diagnose. :type series: pandas.Series :param sim: Pandas series with the simulated time series. Used to diagnose on heteroscedasticity. Ignored if heteroscedasticity is set to False. :type sim: pandas.Series, optional :param alpha: Significance level to calculate the (1-alpha)-confidence intervals. :type alpha: float, optional :param bins: Number of bins used for the histogram. 50 is default. :type bins: int optional :param acf_options: Dictionary with keyword arguments passed on to pastas.stats.acf. :type acf_options: dict, optional :param figsize: Tuple with the height and width of the figure in inches. :type figsize: tuple, optional :param fig: Optionally provide a Matplotib.Figure instance to plot onto. :type fig: Matplotib.Figure instance, optional :param heteroscedasicity: Create two additional subplots to check for heteroscedasticity. If true, a simulated time series has to be provided with the sim argument. :type heteroscedasicity: bool, optional :param \*\*kwargs: Optional keyword arguments, passed on to plt.figure. :type \*\*kwargs: dict, optional :returns: **axes** :rtype: matplotlib.axes.Axes .. rubric:: Examples >>> res = pd.Series(index=pd.date_range(start=0, periods=1000, freq="D"), >>> data=np.random.normal(0, 1, 1000)) >>> ps.stats.plot_diagnostics(res) .. rubric:: Notes The two right-hand side plots assume that the noise or residuals follow a Normal distribution. .. seealso:: :py:obj:`pastas.stats.acf` Method that computes the autocorrelation. :py:obj:`scipy.stats.probplot` Method use to plot the probability plot. .. !! processed by numpydoc !!