Grandom.cif: Additive Random effects model for competing risks data for...

Description Usage Arguments Details Value Author(s) References Examples

View source: R/cor.R

Description

Fits a random effects model describing the dependence in the cumulative incidence curves for subjects within a cluster. Given the gamma distributed random effects it is assumed that the cumulative incidence curves are indpendent, and that the marginal cumulative incidence curves are on additive form

P(T ≤q t, cause=1 | x,z) = P_1(t,x,z) = 1- exp( -x^T A(t) - t z^T β)

Usage

1
2
3
4
5
6
7
Grandom.cif(cif, data, cause, cif2 = NULL, times = NULL, cause1 = 1,
  cause2 = 1, cens.code = NULL, cens.model = "KM", Nit = 40,
  detail = 0, clusters = NULL, theta = NULL, theta.des = NULL,
  weights = NULL, step = 1, sym = 0, same.cens = FALSE,
  censoring.probs = NULL, silent = 1, exp.link = 0,
  score.method = "fisher.scoring", entry = NULL, estimator = 1,
  trunkp = 1, admin.cens = NULL, random.design = NULL, ...)

Arguments

cif

a model object from the comp.risk function with the marginal cumulative incidence of cause2, i.e., the event that is conditioned on, and whose odds the comparision is made with respect to

data

a data.frame with the variables.

cause

specifies the causes related to the death times, the value cens.code is the censoring value.

cif2

specificies model for cause2 if different from cause1.

times

time points

cause1

cause of first coordinate.

cause2

cause of second coordinate.

cens.code

specificies the code for the censoring if NULL then uses the one from the marginal cif model.

cens.model

specified which model to use for the ICPW, KM is Kaplan-Meier alternatively it may be "cox"

Nit

number of iterations for Newton-Raphson algorithm.

detail

if 0 no details are printed during iterations, if 1 details are given.

clusters

specifies the cluster structure.

theta

specifies starting values for the cross-odds-ratio parameters of the model.

theta.des

specifies a regression design for the cross-odds-ratio parameters.

step

specifies the step size for the Newton-Raphson algorith.m

sym

1 for symmetri and 0 otherwise

weights

weights for score equations.

same.cens

if true then censoring within clusters are assumed to be the same variable, default is independent censoring.

censoring.probs

Censoring probabilities

silent

debug information

exp.link

if exp.link=1 then var is on log-scale.

score.method

default uses "nlminb" optimzer, alternatively, use the "fisher-scoring" algorithm.

entry

entry-age in case of delayed entry. Then two causes must be given.

estimator

estimator

trunkp

gives probability of survival for delayed entry, and related to entry-ages given above.

admin.cens

Administrative censoring

random.design

specifies a regression design of 0/1's for the random effects.

...

extra arguments.

Details

We allow a regression structure for the indenpendent gamma distributed random effects and their variances that may depend on cluster covariates.

random.design specificies the random effects for each subject within a cluster. This is a matrix of 1's and 0's with dimension n x d. With d random effects. For a cluster with two subjects, we let the random.design rows be v_1 and v_2. Such that the random effects for subject 1 is

v_1^T (Z_1,...,Z_d)

, for d random effects. Each random effect has an associated parameter (λ_1,...,λ_d). By construction subjects 1's random effect are Gamma distributed with mean λ_1/v_1^T λ and variance λ_1/(v_1^T λ)^2. Note that the random effect v_1^T (Z_1,...,Z_d) has mean 1 and variance 1/(v_1^T λ).

The parameters (λ_1,...,λ_d) are related to the parameters of the model by a regression construction pard (d x k), that links the d λ parameters with the (k) underlying θ parameters

λ = pard θ

Value

returns an object of type 'random.cif'. With the following arguments:

theta

estimate of parameters of model.

var.theta

variance for gamma.

hess

the derivative of the used score.

score

scores at final stage.

theta.iid

matrix of iid decomposition of parametric effects.

Author(s)

Thomas Scheike

References

A Semiparametric Random Effects Model for Multivariate Competing Risks Data, Scheike, Zhang, Sun, Jensen (2010), Biometrika.

Cross odds ratio Modelling of dependence for Multivariate Competing Risks Data, Scheike and Sun (2012), Biostatitistics, to appear.

Scheike, Holst, Hjelmborg (2012), LIDA, to appear. Estimating heritability for cause specific hazards based on twin data

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
data(multcif)
multcif$cause[multcif$cause==0] <- 2
addm<-comp.risk(Event(time,cause)~const(X)+cluster(id),data=multcif,
              cause=1,n.sim=0)

### making group indidcator
g.des<-data.frame(group2=rep(rbinom(200,1,0.5),rep(2,200)))
theta.des <- model.matrix(~-1+factor(group2),g.des)

out1m<-random.cif(addm,data=multcif,cause1=1,cause2=1,Nit=15,detail=0,
theta=2,theta.des=theta.des,step=1.0)
summary(out1m)

## this model can also be formulated as a random effects model
## but with different parameters
out2m<-Grandom.cif(addm,data=multcif,cause1=1,cause2=1,Nit=10,detail=0,
random.design=theta.des,step=1.0)
summary(out2m)
1/out2m$theta
out1m$theta

####################################################################
################### ACE modelling of twin data #####################
####################################################################
### assume that zygbin gives the zygosity of mono and dizygotic twins
### 0 for mono and 1 for dizygotic twins. We now formulate and AC model
zygbin <- g.des$group2 ## indicator of dizygotic twins

n <- nrow(multcif)
### random effects for each cluster
des.rv <- cbind(theta.des,(zygbin==1)*rep(c(1,0)),(zygbin==1)*rep(c(0,1)),1)
### design making parameters half the variance for dizygotic components
pardes <- rbind(c(1,0), c(0.5,0),c(0.5,0), c(0.5,0), c(0,1))


outacem <-Grandom.cif(addm,data=multcif,causeS=1,Nit=30,detail=0,
          theta=c(-1.21,2.1),theta.des=pardes,step=1.0,random.design=des.rv)
summary(outacem)
### genetic variance is
exp(outacem$theta[1])/sum(exp(outacem$theta))^2

mets documentation built on May 2, 2019, 4:43 p.m.