fit.copula: Function to fit a survival copula

fit.copulaR Documentation

Function to fit a survival copula

Description

The function fits a survival copula (Clayton, Gaussian or Plackett) to interval censored data using a two-stage procedure. The marginal dsitributions are fitted using an acceleated failure time model with a smoothed error distribution as implemented in the smoothSurv package. The copula parameter may depend on covariates as well.

Usage

fit.copula(data, copula = "normal", init.param = NULL, cov = ~1,
           marginal1 = formula(data), logscale1 = ~1, lambda1 = exp(3:(-3)),
           marginal2 = formula(data), logscale2 = ~1, lambda2 = exp(3:(-3)),
           bootstrap = FALSE, nboot = 1000,
           control1 = smoothSurvReg.control(info = FALSE),
           control2 = smoothSurvReg.control(info = FALSE),
           seed = 12345)

Arguments

data

Data frame in which to interpret the variables occurring in the formula.

copula

A character string specifying the copula used to fit the model. Valid choices are "normal", "clayton" or "plackett".

init.param

Optional vector of the initial values of the regression parameter(s) of the copula.

cov

A formula expression to determine a possible dependence of the copula parameter. For the Clayton and Plackett copula, the dependence will be modelled on the log-scale. For the normal copula, the dependence will be modelled modulo a Fisher transformation.

marginal1

A formula expression as for other regression models to be used in a smoothSurvReg fit for the first marginal. Use Surv on the left hand side of the formula.

logscale1

A formula expression to determine a possible dependence of the log-scale in the first marginal on covariates. It is used in a smoothSurvReg fit for the first marginal.

lambda1

A vector of values of the tuning parameter lambda for the model of the first marginal. It is used in a smoothSurvReg fit for the first marginal.

marginal2

A formula expression as for other regression models to be used in a smoothSurvReg fit for the second marginal. Use Surv on the left hand side of the formula.

logscale2

A formula expression to determine a possible dependence of the log-scale in the second marginal on covariates. It is used in a smoothSurvReg fit for the second marginal.

lambda2

A vector of values of the tuning parameter lambda for the model of the second marginal. It is used in a smoothSurvReg fit for the second marginal.

bootstrap

If TRUE, a bootstrap is applied in order to determine the standard erros of the copula parameter(s).

nboot

The number of bootstrap samples to be used in case the bootstrap argument is TRUE.

control1

A smoothSurvReg.control object which determines the settings for the smoothSurv fit of the first marginal.

control2

A smoothSurvReg.control object which determines the settings for the smoothSurv fit of the first marginal.

seed

seed for random numbers generator.

Value

A list with elements fit, variance, BScoefficients, BSresults.

Author(s)

Kris Bogaerts kris.bogaerts@kuleuven.be

Examples


### Signal Tandmobiel study
### Plackett copula fitted to emergence times 
### of teeth 14 and 24, covariate = gender
data(tandmob, package = "icensBKL")
tand1424 <- subset(tandmob,
  select = c("GENDER", "fGENDER", "L14", "R14", "L24", "R24"))
summary(tand1424)

T1424.plackett <- fit.copula(tand1424,                             
   copula = "plackett", init.param = NULL, cov = ~GENDER,
   marginal1 = Surv(L14, R14, type = "interval2") ~ GENDER,
   logscale1 = ~GENDER, lambda1 = exp((-3):3),
   marginal2 = Surv(L24, R24, type = "interval2") ~ GENDER,
   logscale2 = ~GENDER, lambda2 = exp((-3):3),
   bootstrap = FALSE)
print(T1424.plackett)
    

icensBKL documentation built on Sept. 19, 2022, 5:06 p.m.