summary.EMSS: Summarizing EM type Sample Selection Model Fits

Description Usage Arguments Examples

View source: R/EMSS.R

Description

summary method for a class "EMSS".

Usage

1
2
3
4
5
## S3 method for class 'EMSS'
summary(object, tidy = FALSE, conf.int = FALSE, conf.level = 0.95, ...)

## S3 method for class 'summary.EMSS'
print(x, digits = max(3, getOption("digits") - 3), ...)

Arguments

object

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

tidy

a logical value stands for whether the summary format is in tidy format or not, if TRUE, the summary function will return a tidy format.

conf.int

a logical value stands for whether the confidence interval is included in the tiny format or not. If TRUE, confidence intervals are included. If tidy = FALSE, this parameter does not control anything.

conf.level

a numeric value between 0 and 1 for controlling the significance level of confidence interval; default value is 0.95.

...

not used, but exists because of the compatibility.

x

an object of class "summary.EMSS".

digits

a numeric number of significant digits.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# examples continued from EMSS
data(Smoke, package = "EMSS")
ex1 <- EMSS(response = cigs_intervals ~ educ,
           selection = smoker ~ educ + age,
           data = Smoke)
summary(ex1)

data(Smoke, package = "EMSS")
ex2 <- EMSS(response = cigs_intervals ~ educ,
           selection =  smoker ~ educ + age,
           data = Smoke, method="ECMnr")
summary(ex2)

## example using random numbers with exclusion restriction

N <- 1000
errps <- mvtnorm::rmvnorm(N,c(0,0),matrix(c(1,0.5,0.5,1),2,2) )
xs <- runif(N)
ys <- xs+errps[,1]>0
xo <- runif(N)
yo <- (xo+errps[,2])*(ys>0)

ex3 <- EMSS(response = yo ~ xo,
           selection = ys ~ xs,
           initial.param = c(rep(0,4), 0.3, 0.6), method="ECMnr")
summary(ex3)

SangkyuStat/EMSS documentation built on Jan. 1, 2022, 7:19 p.m.