larch.numba.Model.d_loglike

larch.numba.Model.d_loglike

Model.d_loglike(x=None, *, start_case=None, stop_case=None, step_case=None, return_series=False, **kwargs)

Compute the first derivative of log likelihood with respect to the parameters.

Parameters
  • x ({'null', 'init', 'best', array-like, dict, scalar}, optional) – Values for the parameters. See set_values for details.

  • start_case (int, default 0) – The first case to include in the log likelihood computation. To include all cases, start from 0 (the default).

  • stop_case (int, default -1) – One past the last case to include in the log likelihood computation. This is processed as usual for Python slicing and iterating, and negative values count backward from the end. To include all cases, end at -1 (the default).

  • step_case (int, default 1) – The step size of the case iterator to use in likelihood calculation. This is processed as usual for Python slicing and iterating. To include all cases, step by 1 (the default).

  • leave_out (int, optional) – Settings for cross validation calculations. If leave_out and subsample are set, then case rows where rownumber % subsample == leave_out are dropped. If keep_only and subsample are set, then only case rows where rownumber % subsample == keep_only are used.

  • keep_only (int, optional) – Settings for cross validation calculations. If leave_out and subsample are set, then case rows where rownumber % subsample == leave_out are dropped. If keep_only and subsample are set, then only case rows where rownumber % subsample == keep_only are used.

  • subsample (int, optional) – Settings for cross validation calculations. If leave_out and subsample are set, then case rows where rownumber % subsample == leave_out are dropped. If keep_only and subsample are set, then only case rows where rownumber % subsample == keep_only are used.

Returns

pd.Series – First derivatives of log likelihood with respect to the parameters (given as the index for the Series).