DIC: Computes the Deviance Information Criterion (DIC) for a...

Usage Arguments Details Value Author(s) References Examples

View source: R/DIC.R

Usage

1
DIC(obj, start = 2, stop = length(obj$theta$solu))

Arguments

obj

A BayesPLS object

start

Compute DIC starting with this iteration. Note, the value refers to iteration number after thinning.

stop

Compute DIC ending with this iteration. Note, the value refers to iteration number after thinning.

Details

DIC accoring to Spiegelhalter et al. (2002)

Value

dic

The DIC value

pd

The estimated effective number of parameters estimated in the model.

Author(s)

Solve S<c3><a6>b<c3><b8>

References

Spiegelhalter, David J.; Best, Nicola G.; Carlin, Bradley P.; van der Linde, Angelika (2002). "Bayesian measures of model complexity and fit (with discussion)". Journal of the Royal Statistical Society, Series B 64 (4)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
library(simrel)
set.seed(1430)
sim <- simrel(n=30, p=50, q=50, relpos=c(1,3), gamma=0.5, R2=0.8, muY=3, muX=rnorm(50,5,1), ntest=1000)
X <- sim$X
Y <- sim$Y

test <- BayesPLS(Y,X,3,scale=TRUE, totiter=500, start=20, dotrace=TRUE, adaptint=50, plotint=10)
est <- estimate(test, start=20)
pred <- predict(est, sim$TESTX)
windows()
plot(sim$TESTY, pred, xlab="Observed", ylab="Predicted", main="Prediction plot for test data")
curve(1*x, add=TRUE, col=2)

print(DIC(est,start=20))

solvsa/BayesPLS documentation built on May 29, 2019, 9:49 a.m.