coef.DiSSMod: Getting Coefficients of Discrete Sample Selection Model Fits

Description Usage Arguments Details Value See Also Examples

Description

coef method for a class "DiSSMod".

Usage

1
2
## S3 method for class 'DiSSMod'
coef(object, only = NULL, ...)

Arguments

object

an object of class "DiSSMod" made by the function DiSSMod.

only

a character value for choosing specific variable's coefficients. Initial value is

...

not used, but exists because of the compatibility. NULL, which shows all variable's coefficients. If "response" is written, only coefficients for response variables will be returned, and if "selection" is written, only coefficients for selection variables will be returned.

Details

It looks as similar as the generic function coef, but this case there are two equations. Therefore, there exist little differences.

Value

a numeric vector or a list is given.

See Also

See also DiSSMod and coef.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# example continued from DiSSMod
set.seed(45)
data(DoctorRWM, package = "DiSSMod")
n0 <- 600
set.n0 <- sample(1:nrow(DoctorRWM), n0)
reduce_DoctorRWM <- DoctorRWM[set.n0,]
result0 <- DiSSMod(response = as.numeric(DOCVIS > 0) ~ AGE + INCOME_SCALE + HHKIDS + EDUC + MARRIED,
                   selection = PUBLIC ~ AGE + EDUC + FEMALE,
                   data = reduce_DoctorRWM, resp.dist="bernoulli", select.dist = "normal",
                   alpha = seq(-5.5, -0.5, length.out = 21), standard = TRUE)

coef(result0)

data(CreditMDR, package = "DiSSMod")
n1 <- 600
set.n1 <- sample(1:nrow(CreditMDR), n1)
reduce_CreditMDR <- CreditMDR[set.n1,]
result1 <- DiSSMod(response = MAJORDRG ~ AGE + INCOME + EXP_INC,
                   selection = CARDHLDR ~ AGE + INCOME + OWNRENT + ADEPCNT + SELFEMPL,
                   data = reduce_CreditMDR, resp.dist="poi", select.dist = "logis",
                   alpha = seq(-0.3, 0.3,length.out = 21), standard = FALSE, verbose = 1)

coef(result1)

DiSSMod documentation built on May 2, 2019, 8:33 a.m.