boxroc: Boxplot and ROC Curves

Description Usage Arguments Value References See Also Examples

Description

Function to display boxplots and ROC curves to show model fit in terms of in-sample link prediction.

Usage

1
2
3
boxroc(Y, EZ, xiT, BOXPLOT = FALSE, ROC = FALSE, Lroc = 100,
  labelsPlot = NULL, powdist = 2, cexRocLeg = 0.8, colRoc = seq(2,
  Ndata + 1), ltyRoc = seq(2, Ndata + 1), lwdRoc = 2, ...)

Arguments

Y

(N x N) binary adjacency matrix, or list containing the adjacency matrices.

EZ

(N x D) matrix (or list of matrices) containing the posterior means of the latent positions

xiT

vector of posterior means of the parameter α

BOXPLOT

logical; if TRUE draws the boxplot. Default BOXPLOT = FALSE

ROC

logical; if TRUE draws the ROC curve. Default ROC = FALSE

Lroc

number of intervals in the ROC curve. Default Lroc = 100

labelsPlot

main title for the boxplot. Default labelsPlot = NULL

powdist

vector of power of the distance default powdist = 2, squared Euclidean distance, the alternative is 1, for the Euclidean distance

cexRocLeg

cex for the ROC curve. Default cexRocLeg = .8

colRoc

col for the ROC curve. Default colRoc = seq(2, Ndata + 1)

ltyRoc

lty for the ROC curve. Default ltyRoc = seq(2, Ndata + 1)

lwdRoc

lwd for the ROC curve. Default lwdRoc = 2

...

Arguments to be passed to methods, such as graphical parameters (see par).

Value

The area under the ROC curve (AUC) and the selected plots. The closer the AUC takes values to 1 the better the fit.

References

Gollini, I., and Murphy, T. B. (2016), 'Joint Modelling of Multiple Network Views', Journal of Computational and Graphical Statistics, 25(1), 246-265 http://arxiv.org/abs/1301.3759.

See Also

lsm, lsjm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
N <- 20
Y <- network(N, directed = FALSE)[,]

modLSM <- lsm(Y, D = 2) 
bp <- boxroc(Y, 
EZ = modLSM$lsmEZ,
xiT = modLSM$xiT, 
Lroc = 150, 
ROC = TRUE, 
BOXPLOT = TRUE)

print(bp)

igollini/lvm4net documentation built on June 20, 2019, 4:48 p.m.