similar to: Evaluation without the parent frame

Displaying 20 results from an estimated 9000 matches similar to: "Evaluation without the parent frame"

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
2010 Dec 14
0
Urgent help requested using survfit(individual=T):
Hello: I would like to obtain probability of an event for one single patient as a function of time (from survfit.coxph) object, as I want to find what is the probability of an event say at 1 month and what is the probability of an event at 80 months and compare. So I tried the following but it fails miserably. I looked at some old posts but could not figure out the solution. Here's what I did
2010 Dec 14
1
survfit
Hello R helpers: *My first message didn't pass trough filter so here it's again* I would like to obtain probability of an event for one single patient as a function of time (from survfit.coxph) object, as I want to find what is the probability of an event say at 1 month and what is the probability of an event at 80 months and compare. So I tried the following but it fails miserably. I
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
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
2013 Nov 04
0
Fwd: Re: How to obtain nonparametric baseline hazard estimates in the gamma frailty model?
-------- Original Message -------- Subject: Re: How to obtain nonparametric baseline hazard estimates in the gamma frailty model? Date: Mon, 04 Nov 2013 17:27:04 -0600 From: Terry Therneau <therneau.terry at mayo.edu> To: Y <yuhanusa at gmail.com> The cumulative hazard is just -log(sfit$surv). The hazard is essentially a density estimate, and that is much harder. You'll notice
2008 Nov 25
1
how to check linearity in Cox regression
On examining non-linearity of Cox coefficients with penalized splines - I have not been able to dig up a completely clear description of the test performed in R or S-plus. >From the Therneau and Grambsch book (2000 - page 126) I gather that the test reported for "linear" has as its null hypothesis that the spline coefficient is the same at the center of basis. Thus, in the example
2011 Apr 18
2
help with eval()
I've narrowed my scope problems with predict.coxph further. Here is a condensed example: fcall3 <- as.formula("time ~ age") dfun3 <- function(dcall) { fit <- lm(dcall, data=lung, model=FALSE) model.frame(fit) } dfun3(fcall3) The final call fails: it can't find 'dcall'. The relevant code in model.frame.lm is: env <- environment(formula$terms)
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
2020 Oct 24
3
Issue with data() function
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 19 data sets, many of them small. The resulting file (using xz compression) is quite a bit
2011 Mar 08
0
function local to a fit
I've added a time-transform ability to coxph: here is an example fit <- coxph(Surv(time, status) ~ age + tt(age) + sex, data=lung, tt=function(x, t, ...) x*log(t) ) The only role for tt() in the formula is to be noticed as a specials by terms(). I currently have tt defined as a function tt <- function(x) It has to be exported in the namespace, documented, etc. Is there a way to
2019 Oct 04
0
Error in [.terms
Martin, ? There are a couple of issues with [.terms that have bitten my survival code.? At the useR conference I promised you a detailed (readable) explanation, and have been lax in getting it to you. The error was first pointed out in a bugzilla note from 2016, by the way.? The current survival code works around these. Consider the following formula: <<testform>>=
2012 Oct 19
1
Addition of plot=F argument to termplot
I have a suggested addition to termplot. We have a local mod that is used whenever none of the termplot options is quite right. It is used here almost daily for Cox models in order to put the y axis on a risk scale: ---- fit <- coxph(Surv(time, status) ~ ph.ecog + pspline(age), data=lung) zz <- termplot(fit, se=TRUE, plot=FALSE) yy <- zz$age$y + outer(zz$age$se, c(0, -2, 2),
2015 Nov 06
0
Puzzled by eval
On 06/11/2015 8:20 AM, Therneau, Terry M., Ph.D. wrote: > Duncan, > That's helpful. Two follow-up questions: > 1. Where would I have found this information? I had looked at eval and model.frame. I think the best description is Luke's article on namespaces, "Name space management for R". Luke Tierney, R News, 3(1):2-6, June 2003. There's a link to it from the
2008 Mar 02
0
coxpath() in package glmpath
Hi, I am new to model selection by coefficient shrinkage method such as lasso. And I became particularly interested in variable selection in Cox regression by lasso. I became aware of the coxpath() in R package glmpath does lasso on Cox model. I have tried the sample script on the help page of coxpath(), but I have difficult time understanding the output. Therefore, I would greatly appreciate if
2013 Feb 18
0
Small suggestion for termplot
Brian, I used termplot(..., plot=FALSE) recently in R-devel: works like a charm. Thanks much for the update. Our in-house "gamterms" function, which this obviates, would also return the "constant" attribute from the underlying predict(..., type="terms") call. I have occasionally found this useful, and so it would be a worthwhile addition to termplot.
2015 Nov 06
1
Puzzled by eval
Duncan, That's helpful. Two follow-up questions: 1. Where would I have found this information? I had looked at eval and model.frame. 2. What stops the following code from falling down the same rabbit hole? Shouldn't it find base::cos first? library(survival) cos <- lung coxph(Surv(time, status) ~ age, data=cos) Terry T. On 11/06/2015 07:51 AM, Duncan Murdoch
2020 Feb 24
0
specials issue, a heads up
I mean if the person filing the bug regards style as more important than the truth of how R treats formulas then they?re literally talking in another language. I strongly recommend you do nothing or at most make a note in the documentation addressing this. Your time is too valuable. On Tue, 25 Feb 2020 at 12:56 am, Therneau, Terry M., Ph.D. via R-devel < r-devel at r-project.org> wrote:
2011 Jul 08
1
survConcordance with 'counting' type Surv()
Dear Prof. Therneau I was impressed to discover that the 'survConcordance' now handles Surv() objects in counting format (example below to clarify what I mean). This is not documented in the help page for the function. I am very curious to see how a c-index is estimated in this case, using just the linear predictors. It was my impression that with left truncation the ordering of