vcov.snreg: Extract the Variance-Covariance Matrix

View source: R/vcov.snreg.R

vcov.snregR Documentation

Extract the Variance-Covariance Matrix

Description

vcov.snreg is the vcov S3 method for objects of class "snreg". It returns the model-based variance-covariance matrix stored in the fitted object.

Usage

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

Arguments

object

an object of class "snreg", typically returned by snreg.

...

additional arguments (currently unused).

Details

Variance-Covariance Matrix for snreg Objects

This method expects a fitted "snreg" object.

This method simply returns the vcov component stored in object. If your estimator did not compute standard errors (e.g., because estimation hasn’t been run yet in a scaffold), this field may be NULL, and the method will error accordingly.

Value

A numeric matrix containing the variance-covariance of the estimated parameters.

See Also

snsf, snreg, lm.mle, coef.snreg, residuals.snreg

Examples

library(snreg)

data("banks07")
head(banks07)

# Translog cost function specification

spe.tl <- log(TC) ~ (log(Y1) + log(Y2) + log(W1) + log(W2))^2 +
  I(0.5 * log(Y1)^2) + I(0.5 * log(Y2)^2) +
  I(0.5 * log(W1)^2) + I(0.5 * log(W2)^2)

# Specification 1: homoskedastic noise and skewness

# Specification 1: homoskedastic noise, skewness, inefficiency

formSV <- NULL   #' variance equation; constant variance
formSK <- NULL   #' skewness equation; constant skewness

m1 <- snreg(
  formula  = spe.tl,
  data     = banks07,
  ln.var.v = formSV,
  skew.v   = formSK
)

vcov(m1)


snreg documentation built on Feb. 6, 2026, 5:08 p.m.