vcov.RprobitB_fit: Extract the posterior covariance matrix

View source: R/posterior.R

vcov.RprobitB_fitR Documentation

Extract the posterior covariance matrix

Description

Computes covariance across all retained draws of global model variables.

Usage

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

Arguments

object

[RprobitB_fit]
Fitted choice model.

...

Currently not used.

Details

The returned matrix is the covariance of the posterior distribution, not the sampling covariance of an estimator. It is reported through stats::vcov() because it is the standard way to ask a fitted model for the covariance of its parameters.

Value

A symmetric numeric matrix whose rows and columns are the global posterior variables returned by coef().

Examples

set.seed(1)
model <- fit(choice ~ x + y | 0, chains = 1)
vcov(model)

RprobitB documentation built on Sept. 20, 2026, 9:07 a.m.