Description Usage Arguments Details Value References See Also Examples

Function for computing the Deviance information criteria for ordinal quantile model with more than 3 outcomes.

1 | ```
deviance_or1(y, x, deltastore, burn, nsim, postMeanbeta, postMeandelta, beta, p)
``` |

`y` |
observed ordinal outcomes, column vector of dimension |

`x` |
covariate matrix of dimension |

`deltastore` |
MCMC draws of |

`burn` |
number of discarded MCMC iterations. |

`nsim` |
total number of samples, including the burn-in. |

`postMeanbeta` |
mean value of |

`postMeandelta` |
mean value of |

`beta` |
MCMC draw of coefficients, dimension is |

`p` |
quantile level or skewness parameter, p in (0,1). |

Deviance is -2*(log likelihood) and has an important role in statistical model comparison because of its relation with Kullback-Leibler information criteria.

Returns a list with components

*DIC = 2*avgdDeviance - devpostmean*

*pd = avgdDeviance - devpostmean*

*devpostmean = -2*(logLikelihood)*

.

Rahman, M. A. (2016). “Bayesian Quantile Regression for Ordinal Models.” Bayesian Analysis, 11(1): 1-24. DOI: 10.1214/15-BA939

Spiegelhalter, D. J., Best, N. G., Carlin, B. P. and Linde, A. (2002). “Bayesian Measures of Model Complexity and Fit.” Journal of the Royal Statistical Society B, Part 4: 583-639. DOI: 10.1111/1467-9868.00353

Gelman, A., Carlin, J. B., Stern, H. S., and Rubin, D. B. “Bayesian Data Analysis.” 2nd Edition, Chapman and Hall. DOI: 10.1002/sim.1856

decision criteria

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 | ```
set.seed(101)
data("data25j4")
x <- data25j4$x
y <- data25j4$y
k <- dim(x)[2]
J <- dim(as.array(unique(y)))[1]
D0 <- 0.25*diag(J - 2)
output <- quantreg_or1(y = y,x = x, B0 = 10*diag(k), D0 = D0,
mcmc = 40, p = 0.25, tune = 1, display = FALSE)
mcmc <- 40
deltastore <- output$delta
burn <- 0.25*mcmc
nsim <- burn + mcmc
postMeanbeta <- output$postMeanbeta
postMeandelta <- output$postMeandelta
beta <- output$beta
deviance <- deviance_or1(y, x, deltastore, burn, nsim,
postMeanbeta, postMeandelta, beta, p = 0.25)
# DIC
# 1375.329
# pd
# 139.1751
# devpostmean
# 1096.979
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.