infactor_or2: Inefficiency factor for ordinal quantile model with 3...

Description Usage Arguments Details Value References See Also Examples

View source: R/ORII.R

Description

This function calculates the inefficiency factor from the MCMC draws of (β, σ) for ordinal quantile model with 3 outcomes. The inefficiency factor is calculated using the batch-means method.

Usage

1
infactor_or2(x, beta, sigma, autocorrelationCutoff)

Arguments

x

covariate matrix of dimension (n x k) including a column of ones with or without column names.

beta

Gibbs draw of coefficients of dimension (k x nsim).

sigma

Gibbs draw of scale factor.

autocorrelationCutoff

cut-off to identify the number of lags.

Details

Calculates the inefficiency factor of (β, σ) using the batch-means method.

Value

Returns a list with components

References

Greenberg, E. (2012). “Introduction to Bayesian Econometrics.” Cambridge University Press, Cambridge. DOI: 10.1017/CBO9780511808920

See Also

pracma, acf

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
set.seed(101)
data("data25j3")
x <- data25j3$x
y <- data25j3$y
k <- dim(x)[2]
output <- quantreg_or2(y = y, x = x, B0 = 10*diag(k),
mcmc = 50, p = 0.25, display = FALSE)
beta <- output$beta
sigma <- output$sigma

inefficiency <- infactor_or2(x, beta, sigma, 0.5)

# Summary of Inefficiency Factor:
#            Inefficiency
# beta_0       2.0011
# beta_1       1.6946
# beta_2       1.4633
# sigma        2.6590

bqror documentation built on Sept. 28, 2021, 5:07 p.m.

Related to infactor_or2 in bqror...