print() shows a fit in a few lines: how it was produced (backend and
inference tier), the call, the observation count and the fixed-effect point
estimates. summary() returns the full report as a summary.tulpa_fit
object, which prints as a sectioned display and whose parts are read by
name; coef() on it returns the fixed-effect table.
Value
print.tulpa_fit() and print.summary.tulpa_fit() return their
input invisibly.
summary.tulpa_fit() returns a list of class summary.tulpa_fit:
call,formula,familyas the fit records them,
NULLwhere it records none.inferencehow the fit was produced: a list of
backend,inference_tier,inference_modeandselection_reason(whymode = "auto"chose that backend).n_obs,n_drawsthe observation count and the number of posterior draws the fixed-effect summaries read (
NULLwithout draws).levelthe interval level of
coefficients.coefficientsdata frame, one row per fixed effect named by the term:
estimate,std.errorand the lower / upper credible bounds, labelled asconfint.tulpa_fit()labels them. Carries theinterval_source,interval_declined,retained_massandskew_appliedattributes described in Details. Also returned bycoef()on the summary.randomthe random-effect standard deviations as
VarCorr()reports them, with their estimated / sampled / conditioned label;NULLon a fit with no random-effect terms.hyperparametersdata frame of the integrated hyperparameters, one row each:
parameter,mean,sd,medianand the 2.5% / 97.5% boundsci_lo/ci_hi. On a nested-Laplace fit these are the outer-grid axes; on the random-effect covariance integrators the derived standard deviations and correlations.NULLwhere the fit integrated none.sigmathe residual / dispersion scale a fit reports as one number, else
NULL.smooth_termsthe fit's
s(...)term metadata,NULLwithout smoothers;smooth_effects()returns the fitted curves.reliabilitya list:
kind("chain","iid"or"point", the draws provenancediagnostics()routes on); on a chainrhat_max,ess_bulk_minandess_tail_minover the parameters; on i.i.d. drawsband, the one-row headlinediagnostics()attaches as itssummaryattribute (outerpareto_kand its band, grid quadrature ESS, inner-Laplace scores,reliability), andmoment_source, which read the per-parameter moments came from;verdict, the whole-fit reading ("converged"/"not converged"on a chain that records its convergence check, the combinedreliabilityverdict on i.i.d. draws,NAotherwise);convergence, the fit's own convergence record; and the backend-specific quality numbersmean_accept(Metropolis acceptance rate),n_divergent(divergent transitions) andelbo(the variational objective), eachNULLwhere the backend has none.axis_fields_droppedthe grid axes the fit's own resolved path could not read, one row per dropped field (block, type, field, path, integrates, reason);
NULLwhenever every supplied axis was used.diagnostic_summary()reads the same record in sentences.priora list whose
betais the Gaussian fixed-effect prior the fit ran under, aslist(mean, sd): the engine defaultprior_normal(0, 2.5)whenever the caller supplied none, andNULLon the paths that express no Gaussian prior on the fixed effects.
coef.summary.tulpa_fit() returns the coefficients data frame.
Details
The fixed-effect table reads the same posterior coef(), confint() and
vcov() read. Sampler tiers report empirical quantiles; the Laplace tier
reports the Gaussian approximation, and so does any fit whose reported
posterior is a closed-form Gaussian (expectation propagation, the
multinomial Laplace fit), whose draws are then samples from that Gaussian
and are not what the summary reads.
On a nested-Laplace fit the estimate and standard error are the
hyperparameter-grid-marginalized moments, and the bounds invert the Gaussian
mixture sum_k w_k N(mu_kj, V_kjj) that grid defines, rather than reading
mu +/- z sigma off the single Gaussian matching those moments. The table's
interval_source attribute records which read produced them
("mixture_cdf", "gaussian_moment", "skew_map_cell", or
"skew_map_cell/mixture_cdf" when the two are in play on different
coefficients) and interval_declined says why, whenever the mixture read
did not run. Its retained_mass attribute gives the share of the grid
weight whose cells retained a fixed-effect block: 1 on a complete grid, and
below 1 on one that dropped a positive-weight cell, whose report is then the
posterior conditional on the cells that remain.
Where no per-cell block was retained the estimate falls back to the
grid-weighted average of the per-cell modes, restricted to the cells whose
inner solve reached a mode. A fit where none did reports NA with
interval_declined = "not_converged", rather than the vector its Newton
started from as an estimate.
With control$skew_correct = TRUE a coefficient whose inner-Laplace
gamma_3 is in the band it is valid on reports Cornish-Fisher quantiles
instead, and the table's skew_applied attribute names which coefficients
took the correction. That correction is measured at the MAP cell, so it is
reported on its own and is not composed with the mixture read; a coefficient
it declines keeps the mixture read rather than falling back further.
The reliability headline is read from diagnostics(), so it answers the
question that applies to how the draws were produced: Rhat and effective
sample size for a chain, the approximation-reliability band (outer
Pareto-k, grid quadrature, inner Laplace, combined verdict) for i.i.d.
draws from a deterministic approximation, and nothing for a point summary.