% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/context.R
\name{new_gwpr_context}
\alias{new_gwpr_context}
\title{Construct a new gwpr_context object}
\usage{
new_gwpr_context(
  call = NULL,
  formula = NULL,
  family = NULL,
  model = NULL,
  effect = NULL,
  id = NULL,
  time = NULL,
  kernel = NULL,
  adaptive = NULL,
  threshold = NULL,
  workers = NULL,
  seed = NULL,
  raw_data = NULL,
  raw_spatial = NULL,
  panel_data = NULL,
  spatial_data = NULL,
  id_map = NULL,
  coords = NULL,
  model_frame = NULL,
  model_matrix = NULL,
  response = NULL,
  metadata = list(),
  warnings = character(),
  ...
)
}
\arguments{
\item{call}{The matched call from the top-level API function.}

\item{formula}{A formula object.}

\item{family}{Character: `"gaussian"` or `"binomial"`.}

\item{model}{Character: `"pooling"`, `"within"`, or `"random"`.}

\item{effect}{Character: `"individual"`, `"time"`, `"two-way"`, or
`"nested"`.}

\item{id}{Name of the unit ID column.}

\item{time}{Name of the time column.}

\item{kernel}{Kernel name.}

\item{adaptive}{Logical; `TRUE` for adaptive bandwidth.}

\item{threshold}{Numeric classification threshold (Logistic).}

\item{workers}{Number of parallel workers.}

\item{seed}{Integer random seed or `NULL`.}

\item{raw_data}{The original user-supplied data frame.}

\item{raw_spatial}{The original user-supplied sf object.}

\item{panel_data}{Processed panel data frame.}

\item{spatial_data}{Processed sf object.}

\item{id_map}{Named integer vector mapping unit IDs to row indices.}

\item{coords}{Matrix of spatial coordinates.}

\item{model_frame}{Model frame derived from formula and panel_data.}

\item{model_matrix}{Design matrix.}

\item{response}{Numeric response vector.}

\item{metadata}{Named list of supplementary information.}

\item{warnings}{Character vector of accumulated warnings.}

\item{...}{Additional named fields stored in the context list.}
}
\value{
A named list with class `"gwpr_context"`.
}
\description{
Creates the standardised internal context list used to pass state between
GWPR modules.  Any field not supplied defaults to `NULL` (or, for
`metadata` and `warnings`, to their appropriate empty types).
}
\keyword{internal}
