% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pmm3_solver.R
\name{.pmm3_nr_solver_nonlinear}
\alias{.pmm3_nr_solver_nonlinear}
\title{PMM3 Newton-Raphson solver for nonlinear models}
\usage{
.pmm3_nr_solver_nonlinear(
  theta_init,
  fn_residuals,
  kappa,
  adaptive = FALSE,
  tol = 1e-06,
  max_iter = 100,
  step_max = 5
)
}
\arguments{
\item{theta_init}{Initial parameter estimates (from MLE/CSS)}

\item{fn_residuals}{Function(theta) returning residual vector}

\item{kappa}{Moment ratio (scalar)}

\item{adaptive}{Re-estimate kappa each iteration? (default FALSE)}

\item{tol}{Convergence tolerance (default 1e-6)}

\item{max_iter}{Maximum NR iterations (default 100)}

\item{step_max}{Maximum step size (default 5.0)}
}
\value{
List: B (estimates), converged, iter, kappa, near_gaussian
}
\description{
Uses a residual function and numerical Jacobian (via \code{numDeriv})
instead of a fixed design matrix. This is necessary for ARIMA and other
models where the linearized design matrix does not capture full dynamics.
}
\details{
The PMM3 estimating equation is:
\deqn{\sum_t \varepsilon_t(\kappa - \varepsilon_t^2) \cdot
      \frac{\partial \varepsilon_t}{\partial \theta} = 0}
}
\keyword{internal}
