% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pmm3_solver.R
\name{.pmm3_nr_solver}
\alias{.pmm3_nr_solver}
\title{PMM3 Newton-Raphson solver (vectorised)}
\usage{
.pmm3_nr_solver(
  B_ols,
  X,
  Y,
  kappa,
  adaptive = FALSE,
  tol = 1e-06,
  max_iter = 100,
  step_max = 5
)
}
\arguments{
\item{B_ols}{OLS starting values (length P)}

\item{X}{Design matrix (n x P)}

\item{Y}{Response vector (length n)}

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

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

\item{tol}{Convergence tolerance on ||delta||_2 (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{
Solves the PMM3 score equations using Newton-Raphson iteration.
The score is \eqn{Z = X'(\varepsilon(\kappa - \varepsilon^2))} and the
Jacobian is \eqn{J = X' \mathrm{diag}(3\varepsilon^2 - \kappa) X}.
}
\keyword{internal}
