[R] conditional gap time frailty cox model for recurrent events

2016-09-05 Thread Elisabetta Petracci
Dear users, I am fitting a conditional gap time frailty cox model weighting observations by means of inverse probability time dependent weigths. Attached find the self-explaining dataset. I have used the following sintax: coxph(Surv(gaptstart,gaptstop,status)~treat+strata(nrecord01)+frailty(id,d

[R] from a normal bivariate distribution to the marginal one

2008-01-23 Thread Elisabetta Petracci
Hello, I'm quite new with R and so I would like to know if there is a command to calculate an integral. In particular I simulated a bivariate normal distribution using these simple lines: rbivnorm <- function(n, # sample size mux, # expected value of x