Description Usage Arguments Author(s) References See Also Examples
Given the parameter estimates of α,θ, β[0], β[1],... of the negative binomial mixed effect AR(1) model, these functions compute the following conditional probability:
Pr(q(Y[i,new])>=q(y[i,new])|Y[i,pre]=y[i,pre])
where y[i,new] and y[i,pre] are vectors of previous and new observations from subject i and q() is a function which provides a scalar summary of the new observations. These functions are subroutines of index.batch
. CP.se
returns the estimate of the conditional probability of single subject and the asymptotic standard error of the logit of the estimate of the conditional probability based on the independent model. The computation for of the probability is done by its subroutine jCP
.
1 2 3 4 |
tpar |
A vector of length 3 + # covariates, containing the estimates of the model in the order of \log(α),\log(θ),β[0],β[1],.... Note that α is the dispersion parameter and the θ is a variance estimate of the random effect. If the semi-parametric approach is taken, then \log(θ) is a place holder and can be any number. |
Y1 |
A scalar containing the sum of the previously observed response counts of a subject. |
Y2 |
A scalar containing the summary statistics of the newly observed response counts of a subject q(y[i,new]) |
sn1 |
The number of previous observations. |
sn2 |
The number of new observations. |
XM |
A n[i] by # covariates matrix containing the covariate values of subject i, where whre n[i] is the total number of previous and new observations. If there is no covariate, i.e., the model only has an intercept term, then set |
RE |
See |
V |
The variance covariance matrix of the parameters |
qfun |
See |
oth |
If |
LG |
If |
i.tol |
See |
Zhao, Y. and Kondo, Y.
Detection of unusual increases in MRI lesion counts in individual multiple sclerosis patients. (2013) Zhao, Y., Li, D.K.B., Petkau, A.J., Riddehough, A., Traboulsee, A., Journal of the American Statistical Association.
The main function to fit the model is:
lmeNB
,
The internal functions of lmeNB
for fitting relevant models:
fitParaIND
,
fitParaAR1
,
fitSemiIND
,
fitSemiAR1
,
The other subroutines of index.batch
to compute the conditional probability index:
MCCP.ar1
,
CP.ar1.se
,
CP.se
,
jCP
,
The functions to generate simulated datasets:
rNBME.R
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | ## Not run:
## 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
RE <- "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, RE = RE, V = V, qfun = "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, RE = RE, V = V, qfun = "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, RE = RE, LG = FALSE, oth = NULL, qfun = "sum")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.