Learn R Programming

ipdmeta (version 1.1)

coxmeta.mixed: Mixed data mixed effects meta-analysis with survival data

Description

Estimates fixed and random effects for general frailty structure in a mixed data meta-analysis of censored data.

Usage

coxmeta.mixed(

ipd.formula, meta.formula, random.formula, ipd.data, meta.data, ipd.groups, meta.groups, sigma2, study.group.interaction, max.iter, min.sample, est.delta, mc.step, df, echo = TRUE, max.sample, converge.index )

Arguments

ipd.formula
Formula for patient-level Cox model as would be supplied to coxph
meta.formula
Formula for study-level data surv~log(time)+trt*x
random.formula
Formula of random effects conditional on group factor as would be specified in coxme, i.e. ~(1+trt|study)
ipd.data
Patient-level data frame
meta.data
Study-level data frame containing survival estimates by study and treatment group
ipd.groups
Number of clusters in patient-level dataset
meta.groups
Number of clusters in study-level dataset
sigma2
Variances for aggregate survival estimates of meta.data
study.group.interaction
Factor that is the study and treatment group interaction for meta.data
max.iter
Maximum iterations of MCEM algorithm
min.sample
Starting sample size for samples at E step
est.delta
Stopping criterion threshold based on standardized relative differences for model parameters
mc.step
Determines how sample size is increased to reduce MC error
df
Degrees of freedom for proposal multivariate T distribution
echo
Logical, if TRUE prints maximum weight and standardized difference between iteration estimates of model parameters
max.sample
If given, then a fixed escalation is used so that if max.iter is reached, final sample size is max.sample
converge.index
Index of which parameters to include in the convergence assessment. Default is all parameters

Value

  • List of
  • iterationsNumber of MCEM iterations
  • est.convergeMaximal difference in parameter estimates between consecutive iterations relative to their standard error
  • max.weightMaximum importance weight at E step
  • sd.loglikStandard deviaiton of each importance-sample conditional Log-likelihood, which can be helpful for monitoring the performance of the proposal distribution
  • loglikImportance-sample average Conditional Log-likelihood at each iteration
  • coefFinal estimated fixed effects
  • vcovFinal estimated frailty variances
  • clusterMean frailty effects at final MCEM iteration
  • varList of variance of model parameters with components coef and vcov

Details

This is a mixed effects extension of the model implemented by coxmeta.fixed.

An MCEM algorithm is used to obtain the model estimates. The expectation step utilizes importance sampling based on a multivariate T distribution for the joint frailties.

meta.data are the survival estimates from a KM plot by treatment group. The data.frame should also contain the time measure corresponding to each estimate and the same covariates as in ipd.formula but defined at the aggregate-level. For patient-level covariates, the treatment-within-study sample average is used.

The stopping rule for the EM algorithm is when the maximum of the last three standardized maximum differences are below est.delta or when max.iter has been reached.

The MC error is monitored by the CV of the maximal standardized parameter differences, based on the three most recent iterations. If the CV of the current iteration is greater than the last, the sample size is increased according to $N+\frac{N}{mc.step}$.

The stopping rule for the M step Newton-Rapshon procedure is based on the relative difference of consecutive log-likelihood, stopping when this difference is

See Also

coxph, coxme, coxmeta.fixed

Examples

Run this code
data(ipd.data)
data(meta.data)
set.seed(401)

#UNIVARIATE FRAILTY BY STUDY FACTOR

fit <- coxmeta.mixed(
    Surv(time,event)~trt,surv~log(time)+trt,~(1|group),
    ipd.data,
    meta.data,
    ipd.groups=8,meta.groups=2,
    meta.data$sigma2,
    meta.data$sub.group,
    max.iter=5,
    min.sample=200,
    est.delta=.05,mc.step=1.5,df=10
    )

fit$coef				#MODEL FIT
sqrt(diag(fit$var$coef))		#STANDARD ERROR


sqrt(diag(fit$vcov))	#ESTIMATED FRAILTY STANDARD DEVIATION

###SEPARATION OF STUDY-LEVEL AND PATIENT-LEVEL COVARIATE

ipd.data$x.bar <- rep(tapply(ipd.data$x,ipd.data$group,mean),table(ipd.data$group))
ipd.data$x.c <- ipd.data$x-ipd.data$x.bar
meta.data$x.bar <- meta.data$x

fit <- coxmeta.mixed(
    Surv(time,event)~trt+x.c+x.bar,surv~log(time)+trt+x.bar,~(1|group),
    ipd.data,
    meta.data,
    ipd.groups=8,meta.groups=2,
    meta.data$sigma2,
    meta.data$sub.group,
    max.iter=5,
    min.sample=200,
    est.delta=.05,mc.step=1.5,df=10
    )

fit$coef				#MODEL FIT
sqrt(diag(fit$var$coef))		#STANDARD ERROR


sqrt(diag(fit$vcov))	#ESTIMATED FRAILTY STANDARD DEVIATION

Run the code above in your browser using DataLab