Learn R Programming

ipdmeta (version 1.1)

coxmcem: MCEM with importance sampling for Cox Mixed Effects Model

Description

Estimation for the parameters of a Cox mixed effects model using an EM algorithm with importance sampling to perform the E step.

Usage

coxmcem(

fixed, random, data, df, n.groups, max.iter=10, min.sample=100, mc.step=2, est.delta=5/100, echo = TRUE, init.coef, init.vcov )

Arguments

fixed
Formula for fixed effects model as would be given in coxph
random
Formula for random effects as would be given in coxme, with explicit removal of intercept term if not to be included, i.e. ~-1
data
Data frame of observed data
df
Degrees of freedom for multivariate T proposal
n.groups
Number of clusters
max.iter
Maximum number of EM iterations
min.sample
Starting sample size for frailties at expectation step
mc.step
Integer which increases MC samples if error is still too large
est.delta
Converge criterion for change in estimates between EM iterations
echo
Logical, whether to print convergence details at each EM iteration
init.coef
Initial values for fixed effect parameters
init.vcov
Intiial variance-covariance matrix parameters

Value

  • Returns a list with :
  • coefFixed effects estimates
  • clusterImportance-weighted mean cluster effects
  • vcovEstimated cluster effect variance
  • varList with coef and vcov which give the variance for the fixed effects and random effect variances (diagonal components only), respectively
  • convergenceVector of maximum relative difference of all model parameters between consecutive iterations
  • mc.samplesVector of number of draws from joint proposal for cluster effects which are the basis for the importance-weighted averages at the E step
  • sd.loglikStandard deviation of the target log-likelihood for the sampled frailties. Useful for monitoring variability in the joint frailties and proposal distribution diffuseness.
  • loglikConditional log-likelihood of full model
  • loglik.fixedLog-likelihood of model with no random effects
  • max.weightVector of the iteration's maximum importance weight
  • iterationsThe number of EM iterations performed

Details

If init.coef and init.vcov are not specified, starting values for the regression effects and frailty variance are set to the values in a coxme or phmm is used to set initial values, with coxme tried first.

The proposal density used for the cluster effects at each E step is a multivariate T distribution. Independent samples are taken with location and scale set to the mean and Sigma of coxmcem.initialize. The mean is determined from the frailties of a PPL-based estimation implemented by coxme. If this fails then the MCEM method of phmm is used. The value for scale is a diagonal matrix with entries that are the reciprocal of the effective sample size for each frailty which is the total number of observations divided by the total number of frailties in the model.

Weights are based on the ratio of the penalized partial likelihood and the proposal density times an upper bound. The upper bound is the maximum of the PPL to the proposal among the E-step samples. These weights are then normalized so as to sum to 1.

Convergence is declared reached if the maximum relative change has been less than est.delta for three consecutive iterations.

The sample size changes with the result of the CV check of the relative change in the estimates, comparing the most recent three consecuritve differences to the previous three consecutive differences. If the current iteration CV is greater than the last the sample size increases by $N+\frac{N}{mc.step}$.

See Also

coxme, coxph, phmm

Examples

Run this code
set.seed(3232)

data(cancer.rats)

fit.rats <- 

coxmcem(Surv(time,event)~rx,~(1|litter),n.groups=50,data=cancer.rats,
		max.iter=10,
		min.sample=300,
		mc.step=2,
		est.delta=.01,
		df=50
		)

Run the code above in your browser using DataLab