Re: [R] Predict follow up time using parametric model in r

2018-11-20 Thread Israel Ortiz
You are right. Specifically, I need to predict the mean and median time to failure from a coxph model and several parametric models using new data. Thanks. El lun., 5 nov. 2018 a las 7:11, Therneau, Terry M., Ph.D. (< thern...@mayo.edu>) escribió: > First, type='expected' gives the expected cumu

[R] Predict follow up time using parametric model in r

2018-11-03 Thread Israel Ortiz
I am trying to predict follow-up time using several survival models, both parametric and semi-parametric. I achieve it for semi parametric models using predict.coxph function in R from survival package using type = "expected" as indicated in help. However, for parametric models, this option doesn't

[R] Fwd: Error survreg: Density function returned an an invalid matrix

2015-11-16 Thread Israel Ortiz
Pareto in this form? I assume that you would like > survreg to solve for some parameters -- how do you map them onto the beta > and s values that survreg will attempt to optimize? I have not yet grasped > what it is that you want survreg to DO. > > Terry T. > > > > > >

Re: [R] Error survreg: Density function returned an an invalid matrix

2015-11-16 Thread Israel Ortiz
Thanks Terry, I use the following formula for density: [image: f_X(x)= \begin{cases} \frac{\alpha x_\mathrm{m}^\alpha}{x^{\alpha+1}} & x \ge x_\mathrm{m}, \\ 0 & x < x_\mathrm{m}. \end{cases}] Where *x*m is the minimum value for x. I get this fórmula in https://en.wikipedia.org/wiki/Pareto_distri

Re: [R] Error survreg: Density function returned an an invalid matrix

2015-11-13 Thread Israel Ortiz
Thanks Terry but the error persists. See: > library(foreign)> library(survival)> library(VGAM) > mypareto <- > list(name='Pareto',+ init= function(x, weights,parms){+ > alpha <- length(x)/(sum(log(x)))#this is a MLE for alpha+ > c(media <-(

[R] Error survreg: Density function returned an invalid matrix

2015-11-02 Thread Israel Ortiz
Hi, I want to perform a survival analysis using survreg procedure from survival library in R for a pareto distribution for a time variable, so I set the new distribution using the following sintax: library(foreign) library(survival) library(VGAM) mypareto <- list(name='Pareto',