% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/arvind_fit.R
\name{make_arvind_resid}
\alias{make_arvind_resid}
\title{Transform Residuals for Arvind Fitting}
\usage{
make_arvind_resid(resid_raw, Y_ref)
}
\arguments{
\item{resid_raw}{numeric vector of raw residuals.}

\item{Y_ref}{numeric vector of observed response values (used for scaling).}
}
\value{
A list with components:
\describe{
\item{shift}{numeric; the shift applied.}
\item{sigma}{numeric; the standard deviation used for standardisation.}
\item{e_pos}{numeric vector; positive standardised residuals.}
\item{theta}{numeric; MLE of the Arvind parameter.}
\item{negloglik}{numeric; negative log-likelihood at the MLE.}
}
}
\description{
Transforms raw residuals to positive values suitable for fitting the Arvind
distribution by shifting and standardising.
}
\keyword{internal}
