coef.htobit: Extractor Methods for htobit Objects

Description Usage Arguments Details See Also Examples

View source: R/htobit.R

Description

Methods for extracting information from fitted htobit objects.

Usage

1
2
3
4
5
6
7
8
9
## S3 method for class 'htobit'
coef(object, model = c("full", "location", "scale"), ...)
## S3 method for class 'htobit'
vcov(object, model = c("full", "location", "scale"), ...)

## S3 method for class 'htobit'
terms(x, model = c("location", "scale", "full"), ...)
## S3 method for class 'htobit'
model.matrix(object, model = c("location", "scale"), ...)

Arguments

object, x

an object of class "htobit".

model

character indicating (sub)model for which information should be extracted.

...

currently not used.

Details

In addition to the methods above, a set of standard extractor functions for "htobit" objects is available, see htobit for an overview.

See Also

htobit

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## heteroscedastic tobit model for budget share of alcohol
data("AlcoholTobacco", package = "htobit2017")
AlcoholTobacco$persons <- with(AlcoholTobacco, adults + oldkids + youngkids)
ma <- htobit(alcohol ~ age + log(expenditure) + persons | age + log(expenditure) + persons,
  data = AlcoholTobacco)

## extract coefficients
coef(ma)
coef(ma, model = "location")
coef(ma, model = "scale")

## corresponding model matrices
head(model.matrix(ma, model = "location"))
head(model.matrix(ma, model = "scale"))

htobit2017 documentation built on May 2, 2019, 6:04 p.m.