% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/metahunt.R
\name{summary.metahunt}
\alias{summary.metahunt}
\title{Summarise a MetaHunt fit}
\usage{
\method{summary}{metahunt}(object, ...)
}
\arguments{
\item{object}{A \code{"metahunt"} object from \code{\link[=metahunt]{metahunt()}}.}

\item{...}{Ignored.}
}
\value{
An object of class \code{"summary.metahunt"}: a list with components
\describe{
\item{\code{m}}{Number of studies.}
\item{\code{G_grid}}{Grid size.}
\item{\code{K}}{Number of basis functions.}
\item{\code{weight_method}}{Method used by the weight model.}
\item{\code{predictor_names}}{Character vector of covariate names.}
\item{\code{pi_summary}}{A \code{K}-by-5 numeric matrix; each row gives \code{min},
\code{mean}, \code{median}, \code{max}, and \code{sd} of the corresponding column of
\code{object$pi_hat}.}
\item{\code{n_kept}}{Number of studies retained after denoising.}
\item{\code{n_dropped}}{Number of studies dropped (\code{m - n_kept}).}
\item{\code{denoising}}{List with \code{N} and \code{Delta} from the \code{dfspa} fit
(both \code{NA} when \code{denoise = FALSE}).}
}
}
\description{
Produces a compact summary of a \code{"metahunt"} object, including study/grid
sizes, the weight-model method, per-basis summary statistics for the
training simplex weights \code{pi_hat}, and denoising bookkeeping from the
underlying \code{\link[=dfspa]{dfspa()}} fit.
}
\examples{
set.seed(1)
G <- 25; m <- 40
x <- seq(0, 1, length.out = G)
basis <- rbind(sin(pi * x), cos(pi * x), x)
W <- data.frame(w1 = rnorm(m), w2 = rnorm(m))
eta <- as.matrix(W) \%*\% cbind(c(1, -0.8), c(-0.5, 1.2), c(0, 0))
pi_true <- exp(eta) / rowSums(exp(eta))
F_hat <- pi_true \%*\% basis + matrix(rnorm(m * G, sd = 0.05), m, G)

fit <- metahunt(F_hat, W, K = 3, dfspa_args = list(denoise = FALSE))
summary(fit)

}
