% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nl_predict.R
\name{nl_predict}
\alias{nl_predict}
\title{Generate predictions from an nl_fit model}
\usage{
nl_predict(
  object,
  x_seq = NULL,
  time_levels = NULL,
  controls_fixed = NULL,
  se = TRUE,
  level = 0.95,
  re_form = NA,
  glmer_ci = c("delta", "boot"),
  n_boot = 500L,
  ...
)
}
\arguments{
\item{object}{An \code{nl_fit} object.}

\item{x_seq}{Optional numeric vector of x values. If \code{NULL}, 200
evenly-spaced points between the 1st and 99th percentiles.}

\item{time_levels}{Optional vector of time levels.}

\item{controls_fixed}{Optional named list of fixed control values.}

\item{se}{Logical; include SEs and CIs. Default \code{TRUE}.}

\item{level}{Confidence level. Default \code{0.95}.}

\item{re_form}{For mixed models: \code{NA} (population-level, default) or
\code{NULL} (include random effects).}

\item{glmer_ci}{Method for glmerMod CIs: \code{"delta"} (default) or
\code{"boot"} (parametric bootstrap).}

\item{n_boot}{Number of bootstrap replicates when \code{glmer_ci = "boot"}.
Default \code{500}.}

\item{...}{Reserved for future use.}
}
\value{
A data frame with columns for the focal predictor, time (if any),
controls at fixed values, \code{fit}, \code{se.fit}, \code{lwr},
and \code{upr}.
}
\description{
Creates a prediction data frame over a grid of the focal predictor \code{x}
(and optionally over \code{time}), holding control variables at typical
values. For mixed models, predictions default to population-level curves
(random effects set to zero).

v2 improvements:
\itemize{
\item \strong{CI for glmerMod}: approximate confidence intervals are
computed via the parametric bootstrap or the delta method. Set
\code{glmer_ci = "delta"} (default, fast) or \code{"boot"} (more
accurate, slower).
\item \strong{Cluster-specific predictions}: set \code{re_form = NULL}
to include random effects in the predictions.
}
}
\seealso{
\code{\link{nl_fit}}, \code{\link{nl_plot}},
\code{\link{nl_derivatives}}
}
