PRIMEplus.LRT {PRIMEplus} | R Documentation |
Likelihood Ratio Test
Description
PRIMEplus likelihood ratio test
Usage
PRIMEplus.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)
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. |
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.
Value
A list containing the objects:
Name | Description |
converged | TRUE if EM algorithm converged |
beta | final log(hazard ratio) estimates of responders versus controls |
lambda | final estimates of baseline hazards |
probResponder | estimated probability of a subject being a responder |
loglike | log-likelihood value at the final estimates |
loglike.marg | marginal log-likelihood value at the final estimates |
loglike.marg.0 | marginal log-likelihood value under the null hypothesis |
LRT | likelihood-ratio test statistic |
pvalue | p-value of the likelihood ratio test |
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.LRT(data, effp, beta0)
ret$LRT
ret$pvalue