% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/simplexreg_influence.R
\name{local.influence}
\alias{local.influence}
\title{Local Influence for Simplex Regression Models}
\usage{
local.influence(
  model,
  scheme = c("case.weight", "response"),
  parameter = c("theta", "beta", "gamma"),
  type = c("Ci", "dmax"),
  plot = FALSE,
  threshold = NULL,
  label.pos = 3,
  plot.type = NULL,
  ...
)
}
\arguments{
\item{model}{An object of class \code{simplexregression}.}

\item{scheme}{Character string specifying the perturbation scheme:
\code{"case.weight"} or \code{"response"}.}

\item{parameter}{Character string indicating the parameter block:
\code{"theta"} (default, all parameters), \code{"beta"} (mean submodel),
or \code{"gamma"} (dispersion submodel).}

\item{type}{Character string specifying the influence measure to compute:
\code{"Ci"} (default, total local influence / normal curvature) or
\code{"dmax"} (maximum influence direction).}

\item{plot}{Logical; if \code{TRUE}, produces an index plot of the selected
measure. Default is \code{FALSE}.}

\item{threshold}{Numeric threshold for identifying influential observations in.
If \code{NULL} (default), no observations are highlighted.}

\item{label.pos}{Position(s) for outlier labels in plot. Can be a single value
(applied to all labels) or a vector. Values: 1 = below, 2 = left, 3 = above,
4 = right.}

\item{plot.type}{Character string controlling the plot style when
\code{plot = TRUE}. If \code{NULL} (default), uses \code{"h"} (vertical
lines). Passed to the \code{type} argument of \code{plot()}.}

\item{...}{Additional graphical parameters passed to \code{plot()}.}
}
\value{
If \code{plot = FALSE} (default), a list containing:
\itemize{
  \item \code{dmax.beta}: Maximum influence direction for mean parameters;
  \item \code{dmax.gamma}: Maximum influence direction for dispersion parameters;
  \item \code{dmax.theta}: Maximum influence direction for all parameters;
  \item \code{Ci.beta}: Total local influence for mean parameters;
  \item \code{Ci.gamma}: Total local influence for dispersion parameters;
  \item \code{Ci.theta}: Total local influence for all parameters.
}
If \code{plot = TRUE}, the same list is returned invisibly.
}
\description{
Computes local influence measures under case-weight and
response perturbation schemes for simplex regression models with
parametric or fixed mean link function.
}
\details{
Measures local influence based on the curvature of the log-likelihood surface
under small perturbations. Two perturbation schemes are implemented:
\itemize{
  \item \strong{Case-weight}: Perturbs observation weights;
  \item \strong{Response perturbation}: Perturbs response values.
}

The index plot of \code{dmax} can be used to detect observations that are
jointly influential for parameters. The index plot of the normal curvature
\code{Ci} can be used to detect observations that are individually influential
for parameters.
}
\examples{
data(ReadingSkills, package = "SimplexRegression")
fit <- simplexreg(accuracy ~ dyslexia * iq | dyslexia + iq + I(iq^2),
                 data = ReadingSkills)

# Local influence under case-weight perturbation — return results
infl_cw <- local.influence(fit, scheme = "case.weight")

# Plot Ci for beta directly from the function call
local.influence(fit, scheme = "case.weight",
                parameter = "beta", type = "Ci", plot = TRUE)

# Plot dmax for all parameters under response perturbation
local.influence(fit, scheme = "response",
                parameter = "theta", type = "dmax", plot = TRUE)

}
\references{
Espinheira, P. L., Silva, A. O. (2020). Residual and influence analysis to a
general class of simplex regression. \emph{TEST}, \bold{29}, 523–-552.
\doi{10.1007/s11749-019-00665-3}
}
\seealso{
\code{\link{hatvalues.simplexregression}},
\code{\link{cooks.distance.simplexregression}},
\code{\link{gleverage.simplexregression}}.
}
