% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pmm2_unified.R
\name{compute_numerical_jacobian}
\alias{compute_numerical_jacobian}
\title{Unified PMM2 Estimator for Nonlinear Regression Models}
\usage{
compute_numerical_jacobian(fn_residuals, theta, method = "Richardson")
}
\arguments{
\item{fn_residuals}{Function(theta) returning the residual vector}

\item{theta}{Current parameter values}

\item{method}{Numerical differentiation method ("Richardson", "simple")}
}
\value{
Jacobian matrix (n x p)
}
\description{
This file contains a unified PMM2 implementation suitable for arbitrary
nonlinear regression models (including SARIMAX) for which residuals
and their derivatives (Jacobian) can be computed.
}
\details{
Two approaches are implemented:
\enumerate{
\item Iterative: Full iterative procedure (Nonlinear PMM2).
\item One-step (Global): Single-step correction after a classical estimator (e.g., MLE).
Compute numerical Jacobian of the residual function
}

Uses numDeriv::jacobian to compute the derivative matrix.
}
\keyword{internal}
