similar to: Issue with data() function

Displaying 20 results from an estimated 20000 matches similar to: "Issue with data() function"

2020 Oct 24
0
Issue with data() function
On 23/10/2020 9:25 p.m., Therneau, Terry M., Ph.D. via R-devel wrote: > I found an issue with the data() command this evening when working on the survival package. > > 1. I have a lot of data sets in the package, almost all used in at least one vignette, > help file, or test.? As a space saving measure, I have bundled many of them together, > i.e., the file data/cancer.rda contains
2004 Nov 23
6
Weibull survival regression
Dear R users, Please can you help me with a relatively straightforward problem that I am struggling with? I am simply trying to plot a baseline survivor and hazard function for a simple data set of lung cancer survival where `futime' is follow up time in months and status is 1=dead and 0=alive. Using the survival package: lung.wbs <- survreg( Surv(futime, status)~ 1, data=lung,
2011 May 12
3
Survival Rate Estimates
Dear List, Is there an automated way to use the survival package to generate survival rate estimates and their standard errors? To be clear, *not *the survivorship estimates (which are cumulative), but the survival *rate * estimates... Thank you in advance for any help. Best, Brian [[alternative HTML version deleted]]
2012 Jun 05
1
model.frame and predvars
I was looking at how the model.frame method for lm works and comparing it to my own for coxph. The big difference is that I try to retain xlevels and predvars information for a new model frame, and lm does not. I use a call to model.frame in predict.coxph, which is why I went that route, but never noted the difference till now (preparing for my course in Nashville). Could someone shed light
2009 Sep 08
1
Obtaining value of median survival for survfit function to use in calculation
Hi, I'm sure this should be simple but I can't figure it out! I want to get the median survival calculated by the survfit function and use the value rather than just be able to print it. Something like this: library(survival) data(lung) lung.byPS = survfit(Surv (time, status) ~ ph.ecog, data=lung) # lung.byPS Call: survfit(formula = Surv(time, status) ~ ph.ecog, data = lung) 1
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)),
2012 May 16
1
Evaluation without using the parent frame
I've been tracking down a survival problem from R-help today. A short version of the primary issue is reconstructed by the following simple example: library(survival) attach(lung) fit <- coxph(Surv(time, status) ~ log(age)) predict(fit, newdata=data.frame(abe=45)) Note the typo in the last line of "abe" instead of "age". Instead of an error message, this returns
2013 May 02
1
loading of an unwanted namespace
I have a debugging environment for the survival package, perhaps unique to me, but I find it works very well. To wit, a separate directory with copies of the source code but none of the package accuements of DESCRIPTION, NAMESPACE, etc. This separate space does NOT contain a copy of src/init.c Within this I use R --vanilla, attach my .RData file, survival.so file, and away we go. That is,
2020 Feb 24
6
specials issue, a heads up
I recently had a long argument wrt the survival package, namely that the following code didn't do what they expected, and so they reported it as a bug ? survival::coxph( survival::Surv(time, status) ~ age + sex + survival::strata(inst), data=lung) a. The Google R style guide? recommends that one put :: everywhere b. This breaks the recognition of cluster as a "special" in the
2010 Jul 09
4
Mysterious behavior
I had trouble with some tests for the survival suite last night that I cannot explain. Framework: Ubuntu Linux, R2.11. For testing survival I have a separate directory and Makefile. I pull everything into the local .RData, no packages, library, or namespace. (It's easier to add test modifications to a routine in a chain of calls). A test of survreg + psline would fail because
2012 Oct 14
1
Problems with coxph and survfit in a stratified model, with interactions
First, here is your message as it appears on R-help. On 10/14/2012 05:00 AM, r-help-request@r-project.org wrote: > I?m trying to set up proportional hazard model that is stratified with > respect to covariate 1 and has an interaction between covariate 1 and > another variable, covariate 2. Both variables are categorical. In the > following, I try to illustrate the two problems that
2008 Mar 03
1
Problem plotting curve on survival curve
Calum had a long question about drawing survival curves after fitting a Weibull model, using pweibull, which I have not reproduced. It is easier to get survival curves using the predict function. Here is a simple example: > library(survival) > tfit <- survreg(Surv(time, status) ~ factor(ph.ecog), data=lung) > table(lung$ph.ecog) 0 1 2 3 <NA> 63 113 50 1
2014 Jul 05
1
Predictions from "coxph" or "cph" objects
Dear R users, My apologies for the simple question, as I'm starting to learn the concepts behind the Cox PH model. I was just experimenting with the survival and rms packages for this. I'm simply trying to obtain the expected survival time (as opposed to the probability of survival at a given time t). I can't seem to find an option from the "type" argument in the predict
2020 Feb 24
1
specials issue, a heads up
In the long run, coming up with a way to parse specials in formulas that is both clean and robust is a good idea - annoying users are a little bit like CRAN maintainers in this respect. I think I would probably do this by testing identical(eval(extracted_head), survival::Surv) - but this has lots of potential annoyances (what if extracted_head is a symbol that can't be found in any attached
2008 Mar 10
3
A stats question -- about survival analysis and censoring
Dear UseRs, Suppose I have data regarding smoking habits of a prospective cohort and wish to determine the risk ratio of colorectal cancer in the smokers compared to the non-smokers. What do I do at the end of the study with people who die of heart disease? Can I just censor them exactly the same as people who become uncontactable or who die in a plane crash? If not, why not? I'm thinking
2010 Mar 05
2
Defining a method in two packages
The coxme package has a ranef() method, as does lme4. I'm having trouble getting them to play together, as shown below. (The particular model in the example isn't defensible, but uses a standard data set.) The problem is that most of the time only one of lme4 or coxme will be loaded, so each needs to define the basic ranef function as well as a method for it. But when loaded together
2005 Feb 02
4
(no subject)
can you recommend a good manual for R that starts with a data set and gives demonstrations on what can be done using R? I downloadedR Langauage definition and An introduction to R but haven't found them overly useful. I'd really like to be able to follow some tutorials using a dataset or many datasets. The datasets I have available on R are Data sets in package 'datasets':
2009 Sep 16
2
Teasing out logrank differences *between* groups using survdiff or something else?
R Folk: Please forgive what I'm sure is a fairly na?ve question; I hope it's clear. A colleague and I have been doing a really simple one-off survival analysis, but this is an area with which we are not very familiar, we just happen to have gathered some data that needs this type of analysis. We've done quite a bit of reading, but answers escape us, even though the question below
2013 Mar 26
1
Weighted Kaplan-Meier estimates with R
There are two ways to view weights. One is to treat them as case weights, i.e., a weight of 3 means that there were actually three identical observations in the primary data, which were collapsed to a single observation in the data frame to save space. This is the assumption of survfit. (Most readers of this list will be too young to remember when computer memory was so small that we had to
2010 Nov 12
3
predict.coxph
Since I read the list in digest form (and was out ill yesterday) I'm late to the discussion. There are 3 steps for predicting survival, using a Cox model: 1. Fit the data fit <- coxph(Surv(time, status) ~ age + ph.ecog, data=lung) The biggest question to answer here is what covariates you wish to base the prediction on. There is the usual tradeoff between too few (leave out something