
Grandom.cif(cif, data, cause, cif2 = NULL, times = NULL,
cause1 = 1, cause2 = 1, cens.code = 0,
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 = 1,
score.method = "nlminb", entry = NULL, estimator = 1,
trunkp = 1, admin.cens = NULL, random.design = NULL,
...)
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
The parameters $(\lambda_1,...,\lambda_d)$ are
related to the parameters of the model by a regression
construction $pard$ (d x k), that links the $d$
$\lambda$ parameters with the (k) underlying
$\theta$ parameters
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
data(multcif)
multcif$cause[multcif$cause==0] <- 2
addm<-comp.risk(Surv(time,status>0)~const(X)+cluster(id),data=multcif,
multcif$cause,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
Run the code above in your browser using DataLab