% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data_prepare.R
\name{prepare_data}
\alias{prepare_data}
\title{Prepare all data structures for GWPR fitting}
\usage{
prepare_data(context)
}
\arguments{
\item{context}{A `gwpr_context` object with at least `formula`, `family`,
`id`, `time`, `model`, `raw_data`, and `raw_spatial` populated.}
}
\value{
An updated `gwpr_context` with `panel_data`, `spatial_data`,
  `id_map`, `coords`, `model_frame`, `model_matrix`, `response`, and
  `metadata` filled in.
}
\description{
Orchestrates the full data preparation pipeline: panel data extraction,
spatial data extraction, ID mapping, model frame and model matrix
construction. Updates and returns a `gwpr_context`.
}
\keyword{internal}
