Learn R Programming

snreg (version 1.2.0)

coef.snreg: Extract Model Coefficients

Description

coef.snreg is the S3 method for extracting the estimated regression coefficients from an object of class "snreg".

Usage

# S3 method for snreg
coef(object, ...)

Value

A numeric vector containing the model coefficients.

Arguments

object

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

...

additional arguments (currently unused).

Details

Coefficients from an snreg Model

This method simply returns the coef component stored inside the fitted "snreg" object. If the object does not contain coefficient estimates (e.g., if estimation was not completed in a scaffold), an informative error is raised.

See Also

snsf, snreg, lm.mle, vcov.snreg, residuals.snreg

Examples

Run this code
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

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
)

coef(m1)

Run the code above in your browser using DataLab