similar to: Extracting the survival function estimate from a survreg object.

Displaying 20 results from an estimated 1000 matches similar to: "Extracting the survival function estimate from a survreg object."

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
2008 Nov 26
1
survreg and pweibull
Dear all - I have followed the thread the reply to which was lead by Thomas Lumley about using pweibull to generate fitted survival curves for survreg models. http://tolstoy.newcastle.edu.au/R/help/04/11/7766.html Using the lung data set, data(lung) lung.wbs <- survreg( Surv(time, status)~ 1, data=lung, dist='weibull') curve(pweibull(x, scale=exp(coef(lung.wbs)),
2004 Jan 08
0
(no subject)
Seems like get() is what you are looking for; e.g., try dim(get("a")), names(get("a")), etc. HTH, Andy > From: Sixten Borg > > Hello, > > I have trouble converting a character string to a R object. > Let me describe this by an example; > > > dim(a) > [1] 270 14 > > dim("a") > NULL > > > names(a) > [1]
2004 Jan 08
1
(no subject)
Hello, I have trouble converting a character string to a R object. Let me describe this by an example; > dim(a) [1] 270 14 > dim("a") NULL > names(a) [1] "Var1" "Var2" "Var3" "Var4" "Var5" "Var6" "Var7" "Var8" "Var9" [10] "Var10" "Var11" "Var12"
2006 Mar 24
1
R crashes when loading library/package; Windows, Cygwin
Dear list members, This is a question is about building an R package under windows and cygwin. Please bear with me. I have a package in R that compiles well on my stationary computer (WINDOWS NT, R 1.8.1 and prior), and the resulting (package_version).zip file works well there. It contains an R script file and a C file. After installing tools to build the package on my laptop, the package
2005 May 03
2
comparing lm(), survreg( ... , dist="gaussian") and survreg( ... , dist="lognormal")
Dear R-Helpers: I have tried everything I can think of and hope not to appear too foolish when my error is pointed out to me. I have some real data (18 points) that look linear on a log-log plot so I used them for a comparison of lm() and survreg. There are no suspensions. survreg.df <- data.frame(Cycles=c(2009000, 577000, 145000, 376000, 37000, 979000, 17420000, 71065000, 46397000,
2006 Mar 24
0
Random covariate in survreg (Survival)
Dear R Listers- I am attempting to analyse the survival of seeds in cages (exclosures) that differ in their permeability to rainforest mammals. Because I did not observe the moment of seed disappearance, my data is interval censored. This limits my options for analysis (as I understand it) to survreg, in the survival package. Because I repeated the experiment in 8 sites, I have a random
2007 Nov 29
1
Survreg(), Surv() and interval-censored data
Can anybody give me a neat example of interval censored data analysis codes in R? Given that suvreg(Surv(c(1,1,NA,3),c(2,NA,2,3),type="interval2")~1) works why does survreg(Surv(data[,1],data[,2],type="interval2")~1) not work where data is : T.1 T.2 Status 1 0.0000000 0.62873036 1 2 0.0000000 2.07039068 1 3 0.0000000
2006 Apr 26
0
left-truncation in survreg
Dear R-users, I know that a few people have asked whether survreg handles left-truncation data and the reply that i have seen so far is that it does. However, when I try to use survreg on left-truncated data, I got the following error message. > survcs3<-survreg(Surv(start,end,status)~AG, data=DPONEcs3, dist="exponential") Error in survreg(Surv(start, end, status) ~ AG, data =
2009 Jun 01
1
survreg.distributions() error
Hi there. I am receiving an unexpected error message when creating a new distribution for the survreg() function in the survival package. I understand the survival.distributions() function and have been following the Cauchy example provided in the help file. My goal is to use survreg to fit a gamma distribution to interval censored data. Here is a simple example of what I'm trying to do.
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
2004 Jun 24
3
R 1.9.0, special characters in variable names.
Hello all, I upgraded from R 1.8.1 to 1.9.0 (Windows XP), and spotted an odd thing. The last three letters in the Swedish alphabet are ??, ?? and ??. (In case they don't show correctly: they are a with a ring, a with two dots, and o with two dots (HTML: &aring; &auml; &ouml;). When I use these as variable names in a data.frame, odd things happen: In R 1.8.1, ?? (&aring;)
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.
2005 Oct 20
0
survreg anova: problem with indirect invocation
Dear R help, I've encountered a problem with survreg's anova(). I am currently writing general code to fit a variety of models using different fitting functions. Here's a simple example of what I'm trying to do: ---begin code--- # general function to analyse data analyse.data <- function(formula, FUN, data, ...) { fit <- FUN(formula, data=data, ...) anova(fit)
2009 Jun 07
1
Survreg function for loglogistic hazard estimation
I am trying to use R to do loglogistic hazard estimation. My plan is to generate a loglogistic hazard sample data and then use survreg to estimate it. If everything is correct, survreg should return the parameters I have used to generate the sample data. I have written the following code to do a time invariant hazard estimation. The output of summary(modloglog) shows the factor loading of
2005 Nov 18
1
Truncated observations in survreg
Dear R-list I have been trying to make survreg fit a normal regression model with left truncated data, but unfortunately I am not able to figure out how to do it. The following survreg-call seems to work just fine when the observations are right censored: library(survival) n<-100000 #censored observations x<-rnorm(n) y<-rnorm(n,mean=x) d<-data.frame(x,y) d$ym<-pmin(y,0.5)
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
2008 Apr 17
1
survreg() with frailty
Dear R-users, I have noticed small discrepencies in the reported estimate of the variance of the frailty by the print method for survreg() and the 'theta' component included in the object fit: # Examples in R-2.6.2 for Windows library(survival) # version 2.34-1 (2008-03-31) # discrepancy fit1 <- survreg(Surv(time, status) ~ rx + frailty(litter), rats) fit1 fit1$history[[1]]$theta
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 <-
2002 Nov 14
0
survreg (survival) reports erroneous results for left-censored (PR#2291)
On Wed, 13 Nov 2002, Jan de Leeuw wrote: > > No problemo. And, in fact, I get the same results in > the R-1.6.0 Carbon version. I don't. Could there be a G3/G4 issue? -thomas > --- Jan > > On Wednesday, November 13, 2002, at 02:05 PM, tim@timcohn.com wrote: > > > Full_Name: Tim Cohn > > Version: 1.6.1 > > OS: Macintosh OS X > > Submission