PRIMEplus randomization likelihood ratio test
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)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 |
Data frame or matrix containing a time-to-event variable (time.var),
a treatment variable (trt.var),
and a censoring variable (status.var).
Vector of proportions for groups of responders in the treatment arm at baseline (see details).
Vector or matrix of initial estimates for the log-hazard ratios (see details).
Time-to-event variable name in data. The default is "X".
Binary treatment variable name in data coded as
0 for controls and 1 for subjects that received treatment.
Name of the binary censoring variable in data coded
as 0 for censored subjects and 1 for subjects that
experienced an event.
NULL or subject id variable in data. The default is "id".
Delayed duration. The default is 1.
NULL or vector of initial estimates for the baseline hazards corrsponding to the ordered event times.
Stopping tolerance. The default is 1e-4.
Maximum number of iterations. The default is 100000.
0-2 to print information. Larger values will print more information. The default is 0.
The number of randomizations. The default is 1000.
Zhenzhen Xu <Zhenzhen.Xu@fda.hhs.gov>, Yongsoek Park <yongpark@pitt.edu> and Bin Zhu <bin.zhu@nih.gov>
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.
PRIMEplus.LRT
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
Run the code above in your browser using DataLab