% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/estimate.R
\name{estimate}
\alias{estimate}
\alias{estimate.PStrataFit}
\title{Extract Posterior Potential Outcomes}
\usage{
estimate(object, ...)

\method{estimate}{PStrataFit}(object, type = c("probability", "RACE"), ...)
}
\arguments{
\item{object}{A \code{PStrataFit} object.}

\item{...}{Additional arguments (unused).}

\item{type}{For survival models: \code{"probability"} (survival probability)
or \code{"RACE"} (restricted average causal effect).}
}
\value{
A \code{PSEstimate} object containing
\item{outcome_array}{[S, Z, iter] array for non-survival,
  or [S, Z, T, iter] for survival.}
\item{is_survival}{Logical.}
\item{time_points}{Numeric vector (survival only).}
\item{model_info}{List of strata names, treatment info,
  family, ER flags, outcome groups.}
}
\description{
Maps posterior samples of outcome-group means back to
the (stratum x treatment) grid via the SZDG table.
}
\examples{
\donttest{
data(sim_data_normal)
model <- PStrataModel(
  S.formula = Z + D ~ 1,
  Y.formula = Y ~ 1,
  Y.family  = gaussian(),
  strata    = c(n = "00", c = "01", a = "11"),
  ER        = c("n", "a")
)
ps_fit <- fit(model, data = sim_data_normal, chains = 2, iter = 500)
est <- estimate(ps_fit)
summary(est)
plot(est)
}
}
