% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/model_diagnostics.R
\name{maxent_response_curve}
\alias{maxent_response_curve}
\title{Compute Marginal Response Curve}
\usage{
maxent_response_curve(
  model,
  env_grids,
  feature_names,
  var_index,
  n_steps = 100L
)
}
\arguments{
\item{model}{External pointer to a FeaturedSpace object.}

\item{env_grids}{List of external pointers to Grid<float> objects.}

\item{feature_names}{Character vector of environment variable names.}

\item{var_index}{0-based index of the variable to vary.}

\item{n_steps}{Number of steps across the variable range (default 100).}
}
\value{
A data.frame with columns:
  \describe{
    \item{value}{Environmental variable value}
    \item{prediction}{Cloglog-transformed prediction}
  }
}
\description{
Generates a response curve by varying one environmental variable from its
minimum to maximum value while holding all other variables at their mean.
Applies the Java Maxent cloglog transform, matching the output of Java
Maxent and \pkg{dismo}:
\deqn{cloglog = 1 - exp(-exp(H) \cdot raw)}
}
\examples{
\donttest{
curve <- maxent_response_curve(model, list(g1, g2),
           c("temp", "precip"), var_index = 0)
plot(curve$value, curve$prediction, type = "l")
}
}
\seealso{
\code{\link{maxent_response_curve_fixed}}
}
