[R] Shared Frailty in survival package (left truncation, time-dep. covariates)
Dear list, I want o fit a shared gamma frailty model with the frailty specification in the survival package. I have partly left-truncated data and time-dependent covariates. Is it possible to combine these two things in the frailty function. Or are the results wrong if I use data in the start-stop-formulation which account for delayed entry? Is the frailty distribution updated in the left-truncated case? Or is the frailty function only built for time-constant covariates and left truncated data? Thank you, Stef. [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] nlminb to optmin
Hi! I want to convert S-Plus 6.2 code to R 2.1.0. Instead of the function nlminb I use the function optmin optmin(start,fn,gr,method=L-BFGS-B, lower, upper, hess,...) But then I get the Error in optmin ...: L-BFGS-B needs finite values of fn Then I used optmin(start,fn,gr,method=BFGS, hess, ...) But then I get the Error in optmin ...: initial value in vmmin is not finite I know the final parameter estimates from S-Plus which I use as starting values in R. The upper and lower bounds are close around the final estimates. So there is not much to maximize. What can I do? Thank you for help, Peter [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Left truncation in shared frailty models with time-varying covariates
Hi! I want to estimate a shared gamma frailty model with left truncated data. I use a parametric baseline hazard so that I can use simple ML estimation. As I have a big data set it is ok to assume piecewise constant baseline hazards. As my data are left truncated I have modified the definition of the risk set. Do I also have to modifiy the frailty distribution if I have left truncated data? And if I have to, how? And if I have to, are time-varying covariates modeled with the method of episode splitting a problem? Thank you for any comments, Stefan. [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] transform normally distributed random terms to gamma distributed random terms
Hi, I have normally distributed random terms u~N(0,1). I want to get gamma distributed random terms g~(scale,shape) with E(g)=1=shape/scale and var(g)=theta=1/scale=1/shape. How can I reach my goal? The following way doesn't work: use the distribution function of u to get U(0,1)- distributed random terms, then take the quantile function of the gamma distribution with shape and scale. The resulting random terms must be ~gamma(shape, scale). But it doesn't work. Is there a mistake or do you know another way? Thanks, Stefan. [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html