PRIMEplus.ReRand.LRT {PRIMEplus} | R Documentation |
Randomization Test
Description
PRIMEplus randomization likelihood ratio test
Usage
PRIMEplus.ReRand.LRT(data, effect_p, beta0, time.var="X", trt.var="trt",
status.var="event_status", id.var="id", t1=1, lambda0=NULL,
stopTol=1e-4, maxiter=100000, print=0, num_rand=1000)
Arguments
data |
Data frame or matrix containing a time-to-event variable ( |
effect_p |
Vector of proportions for groups of responders in the treatment arm at baseline (see details). |
beta0 |
Vector or matrix of initial estimates for the log-hazard ratios (see details). |
time.var |
Time-to-event variable name in |
trt.var |
Binary treatment variable name in |
status.var |
Name of the binary censoring variable in |
id.var |
NULL or subject id variable in |
t1 |
Delayed duration. The default is 1. |
lambda0 |
NULL or vector of initial estimates for the baseline hazards corrsponding to the ordered event times. |
stopTol |
Stopping tolerance. The default is 1e-4. |
maxiter |
Maximum number of iterations. The default is 100000. |
print |
0-2 to print information. Larger values will print more information. The default is 0. |
num_rand |
The number of randomizations. The default is 1000. |
Details
The EM algorithm is sensitive to the initial values of the log-hazard ratios (beta0
), so different
initial estimates should be tried to ensure the maximum log-likelihood is obtained.
Thus, beta0
can be a vector or matrix, where in the case of a matrix, each row corresponds to a different set
of intial estimates. Each set of initial estimates must contain distinct non-zero values.
The length and order of effect_p
must be the same as the columns of beta0
. Both of these
should contain information only for the groups of responders. For example, if there are
full responders and partial responders, then effect_p
would be a vector of length two,
and beta0
would be a vector of length two or a matrix with two columns.
The initial values are only used for the observed data; each randomization uses the MLE estimates
as initial estimates.
Value
A list containing the objects:
Name | Description |
pvalue.LRT | p-value of the randomization test based on the likelihood ratio test |
pvalue.loglike.marg | p-value of the randomization test based on the marginal likelihood |
n.randomizations | the number of randomizations that the p-values are based on |
Author(s)
Zhenzhen Xu <Zhenzhen.Xu@fda.hhs.gov>, Yongsoek Park <yongpark@pitt.edu> and Bin Zhu <bin.zhu@nih.gov>
See Also
Examples
data(data, package="PRIMEplus")
effp <- c(0.3, 0.3)
beta0 <- c(log(0.4), log(0.6))
ret <- PRIMEplus.ReRand.LRT(data, effp, beta0, num_rand=100)
ret