Displaying 20 results from an estimated 3000 matches similar to: "defining custom survreg distributions"
2012 Apr 22
1
Survreg
Hi all,
I am trying to run Weibull PH model in R.
Assume in the data set I have x1 a continuous variable and x2 a
categorical variable with two classes (0= sick and 1= healthy). I fit the
model in the following way.
Test=survreg(Surv(time,cens)~ x1+x2,dist="weibull")
My questions are
1. Is it Weibull PH model or Weibull AFT model?
Call:
survreg(formula = Surv(time, delta) ~ x1
2010 Nov 15
1
interpretation of coefficients in survreg AND obtaining the hazard function
1. The weibull is the only distribution that can be written in both a
proportional hazazrds for and an accelerated failure time form. Survreg
uses the latter.
In an ACF model, we model the time to failure. Positive coefficients
are good (longer time to death).
In a PH model, we model the death rate. Positive coefficients are
bad (higher death rate).
You are not the first to be confused
2009 Mar 08
2
survreg help in R
Hey all,
I am trying to use the survreg function in R to estimate the mean and
standard deviation to come up with the MLE of alpha and lambda for the
weibull distribution. I am doing the following:
times<-c(10,13,18,19,23,30,36,38,54,56,59,75,93,97,104,107,107,107)
censor<-c(1,0,0,1,0,1,1,0,0,0,1,1,1,1,0,1,0,0)
survreg(Surv(times,censor),dist='weibull')
and I get the following
2005 Jan 06
0
Parametric Survival Models with Left Truncation, survreg
Hi,
I would like to fit parametric survival models to time-to-event data
that are left truncated. I have checked the help page for survreg and
looked in the R-help archive, and it appears that the R function survreg
from the survival library (version 2.16) should allow me to take account
of left truncation. However, when I try the command
2011 Sep 20
0
Using method = "aic" with pspline & survreg (survival library)
Hi everybody. I'm trying to fit a weibull survival model with a spline
basis for the predictor, using the survival library. I've noticed that it
doesn't seem to be possible to use the aic method to choose the degrees of
freedom for the spline basis in a parametric regression (although it's
fine with the cox model, or if the degrees of freedom are specified directly
by the user),
2010 Nov 16
1
Re : interpretation of coefficients in survreg AND obtaining the hazard function for an individual given a set of predictors
Thanks for sharing the questions and responses!
Is it possible to appreciate how much the coefficients matter in one
or the other model?
Say, using Biau's example, using coxph, as.factor(grade2 ==
"high")TRUE gives hazard ratio 1.27 (rounded).
As clinician I can grasp this HR as 27% relative increase. I can
relate with other published results.
With survreg the Weibull model gives a
2011 Dec 07
1
survreg() provides same results with different distirbutions for left censored data
Hello,
I'm working with some left censored survival data using accelerated failure
time models. I am interested in fitting different distributions to the data
but seem to be getting the same results from the model fit using survreg
regardless of the assumed distribution.
These two codes seem to provide the same results:
aft.gaussian <-
2007 Jul 25
1
anova tables in survreg (PR#9806)
Full_Name: Andrew Manners
Version: 2.5.1
OS: windows xp prof 2003
Submission from: (NULL) (130.102.0.177)
To whom it may concern,
I'm trying to get an ANOVA table within survreg but it always produces NA's in
the p-value, regardless of the data set. The data set below comes from Tableman
and Kim 2004. I had the same problem on a number of my own data sets. I searched
the R site for
2009 Nov 13
2
survreg function in survival package
Hi,
Is it normal to get intercept in the list of covariates in the output of survreg function with standard error, z, p.value etc? Does it mean that intercept was fitted with the covariates? Does Value column represent coefficients or some thing else?
Regards,
-------------------------------------------------
tmp = survreg(Surv(futime, fustat) ~ ecog.ps + rx, ovarian,
2010 Mar 19
0
Different results from survreg with version 2.6.1 and 2.10.1
---------------------------- Original Message ----------------------------
Subject: Different results from survreg with version 2.6.1 and 2.10.1
From: nathalcs at ulrik.uio.no
Date: Fri, March 19, 2010 16:00
To: r-help at r-project.org
--------------------------------------------------------------------------
Dear all
I'm using survreg command in package survival.
2010 Nov 13
2
interpretation of coefficients in survreg AND obtaining the hazard function for an individual given a set of predictors
Dear R help list,
I am modeling some survival data with coxph and survreg (dist='weibull') using
package survival. I have 2 problems:
1) I do not understand how to interpret the regression coefficients in the
survreg output and it is not clear, for me, from ?survreg.objects how to.
Here is an example of the codes that points out my problem:
- data is stc1
- the factor is dichotomous
2004 Jul 28
2
Simulation from a model fitted by survreg.
Dear list,
I would like to simulate individual survival times from a model that has been fitted using the survreg procedure (library survival). Output shown below.
My plan is to extract the shape and scale arguments for use with rweibull() since my error terms are assumed to be Weibull, but it does not make any sense. The mean survival time is easy to predict, but I would like to simulate
2005 Jan 27
0
Survreg with gamma distribution
Dear r-help subscribers,
I am working on some survival analysis of some interval censored failure
time data in R. I have done similar analysis before using PROC LIFEREG
in SAS. In that instance, a gamma survival function was the optimum
parametric model for describing the survival and hazard functions. I
would like to be able to use a gamma function in R, but apparently the
survival package does
2005 Feb 24
2
survreg with gamma distribution: re-post
Dear r-help subscribers,
A couple of weeks ago I sent the following message to the r-help mail
list. It hasn't generated any response, and I could really use some help
on this. Anyone able to help?
Thanks again,
Roger Dungan
>>
I am working on some survival analysis of some interval censored failure
time data in R. I have done similar analysis before using PROC LIFEREG
in SAS. In
2005 Nov 24
4
Survreg Weibull lambda and p
Hi All,
I have conducted the following survival analysis which appears to be OK
(thanks BRipley for solving my earlier problem).
> surv.mod1 <- survreg( Surv(timep1, relall6)~randgrpc, data=Dataset,
dist="weibull", scale = 1)
> summary(surv.mod1)
Call:
survreg(formula = Surv(timep1, relall6) ~ randgrpc, data = Dataset,
dist = "weibull", scale = 1)
2007 Jun 18
1
psm/survreg coefficient values ?
I am using psm to model some parametric survival data, the data is for
length of stay in an emergency department. There are several ways a
patient's stay in the emergency department can end (discharge, admit, etc..)
so I am looking at modeling the effects of several covariates on the various
outcomes. Initially I am trying to fit a survival model for each type of
outcome using the psm
2011 Apr 08
1
Variance of random effects: survreg()
I have the following questions about the variance of the random effects in the survreg() function in the survival package:
1) How can I extract the variance of the random effects after fitting a model?
For example:
set.seed(1007)
x <- runif(100)
m <- rnorm(10, mean = 1, sd =2)
mu <- rep(m, rep(10,10))
test1 <- data.frame(Time = qsurvreg(x, mean = mu, scale= 0.5, distribution =
2003 Apr 20
1
survreg penalized likelihood?
What objective function is maximized by survreg with the default
Weibull model? I'm getting finite parameters in a case that has the
likelihood maximzed at Infinite, so it can't be a simple maximum
likelihood.
Consider the following:
#############################
> set.seed(3)
> Stress <- rep(1:3, each=3)
> ch.life <- exp(9-3*Stress)
> simLife <- rexp(9,
2008 Dec 23
6
Interval censored Data in survreg() with zero values!
Hello,
I have interval censored data, censored between (0, 100). I used the
tobit function in the AER package which in turn backs on survreg.
Actually I'm struggling with the distribution. Data is asymmetrically
distributed, so first choice would be a Weibull distribution.
Unfortunately the Weibull doesn't allow for zero values in time data,
as it requires x > 0. So I tried the
2012 May 04
1
Correct Interpretation of survreg() coeffs
Am I correct in assuming that the output below essentially translates to
"Males have a mean time that is significantly lower than Females"? Is this
the correct way to interpret the fact that the coefficient is negative?
Assume the variale sex is treated as a factor with Female =0 and Male=1.
survmodel<-survreg(survobj~sex,data=data1, dist="weibull")