predict.vblpcm: Find all link probabilities

View source: R/predict.R

predict.vblpcmR Documentation

Find all link probabilities

Description

generate a matrix of link probabilities based on the fitted VB model.

Usage

## S3 method for class 'vblpcm'
predict(object, ...)

Arguments

object

The fitted values; output from vblpcmfit()

...

optional additional arguments.

Value

The posterior predictive link probabilities given the fitted object

Author(s)

Michael Salter-Townshend

Examples

data(sampson)
v.fit<-vblpcmfit(vblpcmstart(samplike,G=3))
### create a matrix of link posterior probabilities given the fitted model
probs<-predict.vblpcm(v.fit)
# show this graphically; separation of the boxes implies a good fit to the data
boxplot(split(probs,v.fit$Y),
        ylab=expression(paste("P(",Y[i][j],"=1)")),xlab=expression(paste(Y[i][j])))

VBLPCM documentation built on March 31, 2023, 9:21 p.m.