% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data_prepare.R
\name{build_model_matrix}
\alias{build_model_matrix}
\title{Build the design matrix and response vector}
\usage{
build_model_matrix(context)
}
\arguments{
\item{context}{A `gwpr_context` with `model_frame`, `formula`, and `family`
populated.}
}
\value{
Updated context with `model_matrix` and `response` populated.
}
\description{
Extracts the response variable `y` and the design matrix `X` from the
model frame.  For `binomial` family, the response is standardised to 0/1
via `standardize_binary_response()`.
}
\keyword{internal}
