phmc_methods: S3 Methods for Proximal Hamiltonian Monte Carlo Objects

phmc_methodsR Documentation

S3 Methods for Proximal Hamiltonian Monte Carlo Objects

Description

Provides summary, printing, extraction, and diagnostic plotting methods for objects returned by phmc.

Usage

## S3 method for class 'phmc'
print(x, ...)

## S3 method for class 'phmc'
summary(object, ...)

## S3 method for class 'summary.phmc'
print(x, ...)

## S3 method for class 'phmc'
coef(object, ...)

## S3 method for class 'phmc'
vcov(object, ...)

## S3 method for class 'phmc'
logLik(object, ...)

## S3 method for class 'phmc'
plot(x, type = c("all", "trace", "acf", "density"), par_indices = NULL, ...)

Arguments

x

An object of class "phmc".

...

Additional arguments passed to generic methods.

object

An object of class "phmc".

type

Character string specifying plot type: "trace" for trace plots, "acf" for autocorrelation, "density" for posterior density, or "all" (default).

par_indices

Optional integer vector specifying parameter indices to plot.

Value

Depending on the S3 method invoked, returns the following:

print.phmc

Invisibly returns the input object x of class "phmc" (called for its side effect of printing summary metrics to the console).

summary.phmc

Returns an object of class "summary.phmc", which is a list containing model parameter estimates, acceptance rate, log-likelihood, information criteria (AIC, BIC, DIC), elapsed time, and regularization parameter lambda_g.

print.summary.phmc

Invisibly returns the input object x of class "summary.phmc" (called for its side effect of printing detailed summary results to the console).

coef.phmc

Returns a named numeric vector of class "numeric" containing posterior mean parameter estimates.

vcov.phmc

Returns a numeric matrix of class "matrix" containing the empirical posterior variance-covariance matrix of the MCMC parameter draws.

logLik.phmc

Returns an object of class "logLik" representing the log-likelihood value evaluated at the MAP estimate, with attributes "df" (number of estimated parameters) and "nobs" (number of retained MCMC draws).

plot.phmc

Invisibly returns the input object x of class "phmc" (called for its side effect of generating diagnostic MCMC trace plots, autocorrelation functions, and posterior density curves).


pHMC documentation built on Aug. 21, 2026, 5:18 p.m.

Related to phmc_methods in pHMC...