## tpar contains: log(a),log(theta),beta0
tpar <- c(0.5, -0.5, 1.3)
## A scalar containing the sum of the response counts in pre scans
Y1 <- 0
## A scalar containing the summary statistics of the response counts in new scans q(y_new)
Y2 <- 1
## The number of scans in the pre scans.
sn1 <- 2
## The number of scans in the new scans.
sn2 <- 3
## the covariate matrix
XM <- NULL
dist <- "G"
## the variance covariance matrix:
V <- matrix(
c(0.0490673003, -0.0004481864, 0.013279476,
-0.0004481864, 0.0245814022, 0.001231522,
0.0132794760, 0.0012315221, 0.023888065),nrow=3)
## the estimate of the conditional probability based on the sum summary statistics and its SE
CP.se(tpar = tpar, Y1=Y1 ,Y2= Y2, sn1 = sn1, sn2 = sn2, XM = XM, dist = dist, V = V, pty = "sum")
## the estimate of the conditional probability based on the max summary statistics and its SE
CP.se(tpar = tpar, Y1=Y1 ,Y2= Y2, sn1 = sn1, sn2 = sn2, XM = XM, dist = dist, V = V, pty = "max")
## jCP calls for CP.se to compute the estimate of the conditional probability
jCP(tpar = tpar, Y1 = Y1, Y2 = Y2, sn1 = sn1, sn2 = sn2,
XM = XM, dist = dist, LG = FALSE, oth = NULL, type = "sum")
Run the code above in your browser using DataLab