Description Usage Arguments Value Author(s) References Examples

View source: R/haplo-match-cif.r

Fits a semiparametric model for the cause-specific quantities :

*
P(T ≤q t, cause=1 | x,h_d,h_p) = P_1(t,x,h_d,h_p) = 1 - \exp(- g(t,x(h_d,h_p)) )
*

for the probability of dying from cause 1 in a situation with
competing causes of death where
*x(h,h_d,h_p)* is a design vector that depends on the unobserved haplotype for
donor and patient. We only observe the related genotype that is the same for
the unrelated donor and patient. The haplotype pairs for donor and patient are using
integer codes that can be read off the geno.setup function.

The model is considered in two situations :

*
g(t,x,z,h_d,h_p) = x(h_d,h_p)^T A(t) + (diag(t^p) z(h_d,h_p))^T β
*

the additive situation (with additive subdistribution hazard) and the proportional setting that includes the Fine & Gray (FG) model and some extensions

*
g(t,x,z,h_d,h_p) = \exp(x(h_d,h_p)^T A(t) + (diag(t^p) z(h_d,h_p))^T β)
*

The FG model is obtained when *x=1*. Where p is 1 for the additive
model and 0 for the proportional model. In general p may be
powers of the same length as z.

The marginal model, given genotype g and covariates x,z are then given as

*
P(T ≤q t, cause=1 | x,z,g) = ∑_{h_d,h_p} P_1(t,x,z,h_d,h_p)
P_θ(H_d=h_d|G=g) P_θ(H_p=h_p|G=g)
*

and this is the model that is fitted to the data.

The call of the function must contain information about the MLE for the underlying haplotype frequencies under HWE equilibrium

* P(H=(h_k,h_j)) = π_k pi_j *

with K different haplotypes, where we parametrize the frequencies as

*
π_k= \frac{ \exp(θ_k) }{1+θ_1+...+θ_{K-1}+0}
*

We allow a regression design on the haplotype parameters to reduce the dimensionality

* θ = G α *

Resampling is used for computing p-values for tests of time-varying effects.

1 2 3 4 5 6 7 | ```
haplomatch.cif(formula,data=sys.parent(),
cause,times,designfuncX,designfuncZ,Nit=50,
clusters=NULL,gamma=0,n.sim=500,weighted=0,model="additive",
causeS=1,cens.code=0,detail=0,interval=0.01,resample.iid=1,
cens.model="KM",time.pow=0,fix.haplofreq=0,haplo.freq=NULL,
alpha.iid=NULL,geno.setup=NULL,fit.haplofreq=NULL,design.test=0,
covnamesX=NULL,covnamesZ=NULL)
``` |

`formula` |
a formula object, with the response on the left of a '~' operator, and the terms on the right. The response must be a survival object as returned by the ‘Surv’ function. The status indicator is not important here. Time-invariant regressors are specified by the wrapper const(), and cluster variables (for computing robust variances) by the wrapper cluster(). |

`data` |
a data.frame with the variables. |

`cause` |
specifies the causes related to the death times, the value 0 is the censoring value. |

`times` |
specifies the times at which the estimator is considered. This is typically all cause "1" jump times. |

`designfuncX` |
R-function(x,h_d,h_p) that gives the X design given x and donor and patient haplotype pairs h_d and h_p. |

`designfuncZ` |
R-function(x,h_d,h_p) that gives the Z design given x and donor and patient haplotype pairs h_d and h_p. |

`Nit` |
number of iterations for Newton-Raphson algorithm. |

`clusters` |
specifies cluster structure, for backwards compability. |

`gamma` |
starting value for constant effects. |

`n.sim` |
number of simulations in resampling. |

`weighted` |
Not implemented. To compute a variance weighted version of the test-processes used for testing time-varying effects. |

`model` |
"additive" or "prop"ortional. |

`causeS` |
specificies which cause we consider. |

`cens.code` |
specificies the code for the censoring. |

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

`interval` |
specifies that we only consider timepoints where the Kaplan-Meier of the censoring distribution is larger than this value. |

`resample.iid` |
to return the iid decomposition, that can be used to construct confidence bands for predictions |

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

`time.pow` |
specifies that the power at which the time-arguments is transformed, for each of the arguments of the const() terms, default is 1 for the additive model and 0 for the proportional model. |

`fix.haplofreq` |
is 1 when haplofrequencies are considered as known. Default is 0 |

`haplo.freq` |
the known haplofrequencies, or estimated MLE. |

`alpha.iid` |
iid decomposition of haplofrequency paramters for uncertainty related to haplotypefrequencies. |

`geno.setup` |
analysis of genotype by geno.setup() function |

`fit.haplofreq` |
MLE fit of haplofrequency model using HWE. |

`design.test` |
prints out the design matrices so one can check that the design is correctly specified in the functions, designfuncX and designfuncX. |

`covnamesX` |
names for output related to additive part of model. |

`covnamesZ` |
names for output related to proportional part of model. |

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

`cum` |
cumulative timevarying regression coefficient estimates are computed within the estimation interval. |

`var.cum` |
pointwise variances estimates. |

`gamma` |
estimate of proportional odds parameters of model. |

`var.gamma` |
variance for gamma. |

`score` |
sum of absolute value of scores. |

`gamma2` |
estimate of constant effects based on the non-parametric estimate. Used for testing of constant effects. |

`obs.testBeq0` |
observed absolute value of supremum of cumulative components scaled with the variance. |

`pval.testBeq0` |
p-value for covariate effects based on supremum test. |

`obs.testBeqC` |
observed absolute value of supremum of difference between observed cumulative process and estimate under null of constant effect. |

`pval.testBeqC` |
p-value based on resampling. |

`obs.testBeqC.is` |
observed integrated squared differences between observed cumulative and estimate under null of constant effect. |

`pval.testBeqC.is` |
p-value based on resampling. |

`conf.band` |
resampling based constant to construct 95% uniform confidence bands. |

`B.iid` |
list of iid decomposition of non-parametric effects. |

`gamma.iid` |
matrix of iid decomposition of parametric effects. |

`test.procBeqC` |
observed test process for testing of time-varying effects |

`sim.test.procBeqC` |
50 resample processes for for testing of time-varying effects |

Thomas Scheike

Scheike and Zhang and Gerds (2008), Predicting cumulative incidence probability by direct binomial regression, Biometrika, 2008.

Scheike and Zhang (2009), Competing risks with missing covariates: Effect of matching haplotypes on BMT patients, work in progress.

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 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | ```
data(bmt);
times<-bmt$time[bmt$cause==1];
# simulated genotype data
Gbmt<-matrix(rbinom(4*nrow(bmt),1,0.5),nrow(bmt),4)
setup<-geno.setup(Gbmt)
# fits MLE under HWE
out<-haplo.freqs(Gbmt,geno.setup=setup)
designXM<-function(x,hd,hp) {
hd<-round(hd); hp<-round(hp);
match<-(hd[1]==hp[1])*(hd[2]==hp[2])
y<-c(x,match)
return(y)
}
designZM<-function(x,z,hd,hp) {
hd<-round(hd); hp<-round(hp);
match<-(hd[1]==hp[1])*(hd[2]==hp[2])
y<-c(x,match)
return(x)
}
# nonparametric additive model
add<-haplomatch.cif(Surv(time,cause>0)~platelet+age+tcell,bmt,
bmt$cause,times[-c(1:5)],designXM,designZM,geno.setup=setup,
causeS=1,fit.haplofreq=out)
summary(add)
par(mfrow=c(2,4))
plot(add)
pout<-predict(add,X=rbind(
c(1,0,0,0,1), # with 1 for match
c(1,0,0,0,0) # without match
))
par(mfrow=c(1,3))
plot(pout,multiple=0,col=1:2)
plot(pout,multiple=1,uniform=0,col=1:2,lty=1,se=0)
# fits semiparmatric model, first specifies design vectors
designXM<-function(x,z,hd,hp) {
hd<-round(hd); hp<-round(hp);
match<-(hd[1]==hp[1])*(hd[2]==hp[2])
y<-c(x,match)
return(x)
}
designZM<-function(x,z,hd,hp) {
hd<-round(hd); hp<-round(hp);
match<-(hd[1]==hp[1])*(hd[2]==hp[2])
y<-c(z,match)
return(y)
}
sadd<-haplomatch.cif(Surv(time,cause>0)~const(platelet)+const(age)+
const(tcell),bmt,bmt$cause,times[-c(1:5)],designXM,designZM,geno.setup=setup,
causeS=1,fit.haplofreq=out)
summary(sadd)
pout<-predict(sadd,X=rbind(c(1),c(1)),
Z=rbind( c(0,0,0,1), # with 1 haplotype 0
c(0,0,0,0) # without haplotype 0
))
plot(pout,multiple=1,uniform=0,col=1:2,lty=1,se=0)
``` |

HaploSurvival documentation built on May 2, 2019, 5:49 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.