Summary Method for qrjoint Model Fit

Share:

Description

Summarize model fit, including MCMC details, for qrjoint

Usage

1
2
3
 
## S3 method for class 'qrjoint'
summary(object, ntrace = 1000, plot.dev = TRUE, more.details = FALSE, ...)

Arguments

object

a fitted model of the class 'qrjoint'.

ntrace

number of draws to be included in trace plots

plot.dev

logical indicator of whether to show trace plot of deviance

more.details

logical indicating whether other details from MCMC are to be plotted

...

a limited number of plotting controls that are passed onto the deviance plot

Value

Displays the trace of the deviance statistic. More details include trace plots of of the proximity parameter of each GP, a plot of Geweke p-values for (from geweke.diag) convergence of each model parameter and an image plot of parameter correlation. Also prints two versions of Watanabe AIC.

The following quantities are returned invisibly.

deviance

vector deviance statistic of the samples parameter draws

pg

a matrix with nsamp number of columns, each columns could be coerced into a matrix of dimension ngrid * (p+1), where the columns gives the conditional posterior weights on the lambda grid values for the corresponding GP function.

prox

posterior draws of proximity in the form of a (p+1)*nsamp matrix.

ll

a matrix of n*nsamp containing observation level log-likelihood contributions. Used to calculate waic, and could be used for other AIC calculations.

waic

Two versions of Watanabe AIC from Gelman, Hwang and Vehtari (2014).

References

Gelman, A., Hwang, J., and Vehtari, A. (2014). Understanding predictive information criterion for Bayesian models. Stat Comput, 24, 997-1016.

See Also

qrjoint and coef.qrjoint.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
 
# Plasma data analysis

# recoding variables
data(plasma)
plasma$Sex <- as.factor(plasma$Sex)
plasma$SmokStat <- as.factor(plasma$SmokStat)
plasma$VitUse <- 3 - plasma$VitUse
plasma$VitUse <- as.factor(plasma$VitUse)

# creating predictors and response (beta carotene concentration in the plasma)
X <- model.matrix(BetaPlasma ~ Age + Sex + SmokStat + Quetelet + VitUse + Calories + 
        Fat + Fiber + Alcohol + Cholesterol + BetaDiet, data = plasma)[,-1]
Y <- plasma$BetaPlasma

# model fitting with 50 posterior samples from 100 iterations (thin = 2)
fit.qrj <- qrjoint(X, Y, 50, 2)
summary(fit.qrj, more = TRUE)