Displaying 20 results from an estimated 10000 matches similar to: "Evaluation without using the parent frame"
2012 May 17
0
Evaluation without the parent frame
Duncan,
I agree completely with "don't use attach"; if I could get all the
users of the survival package to agree as well the problem in question
would go away :-) I'm thinking about ways to add more effective error
surveillance.
Your suggestion was not horribly complex and I'll look into it
further. My first foray failed because what I want (I think) is the
2012 Oct 13
4
Problems with coxph and survfit in a stratified model with interactions
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 I?ve encountered, using
the lung dataset.
The first problem is the warning:
To me, it seems that there are too many dummies
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
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
2009 Feb 25
3
survival::survfit,plot.survfit
I am confused when trying the function survfit.
my question is: what does the survival curve given by plot.survfit mean?
is it the survival curve with different covariates at different points?
or just the baseline survival curve?
for example, I run the following code and get the survival curve
####
library(survival)
fit<-coxph(Surv(futime,fustat)~resid.ds+rx+ecog.ps,data=ovarian)
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
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)
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,
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
2012 Jul 26
1
how to plot hazard function for coxph model?
Dear all,
I have been trying to plot hazard function in R for survival data, but in
vain.
Can anybody help me out in plotting hazard function in R?
Dr Suman Kumar
--
View this message in context: http://r.789695.n4.nabble.com/how-to-plot-hazard-function-for-coxph-model-tp4637953.html
Sent from the R help mailing list archive at Nabble.com.
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)),
2013 Jul 06
1
problem with BootCV for coxph in pec after feature selection with glmnet (lasso)
Hi,
I am attempting to evaluate the prediction error of a coxph model that was
built after feature selection with glmnet.
In the preprocessing stage I used na.omit (dataset) to remove NAs.
I reconstructed all my factor variables into binary variables with dummies
(using model.matrix)
I then used glmnet lasso to fit a cox model and select the best performing
features.
Then I fit a coxph model
2011 Jul 23
2
standard error of exp(coef) from coxph
Dear List,
Must be a silly question, but I was wondering whether there is a direct way of calculating "standard error of a HR or exp(coef)" from coxph objects
x <- coxph(Surv(time, status) ~ age + inst, lung)> x coef exp(coef) se(coef) z page 0.0190 1.02 0.00925 2.06 0.04inst -0.0104 0.99 0.01028 -1.01 0.31
cheers,
Ehsan
[[alternative HTML
2006 May 07
1
model selection, stepAIC(), and coxph() (fwd)
Hello,
My question concerns model selection, stepAIC(), add1(), and coxph().
In Venables and Ripley (3rd Ed) pp389-390 there is an example of using
stepAIC() for the automated selection of a coxph model for VA lung cancer
data.
A statistics question: Can partial likelihoods be interpreted in the same
manner as likelihoods with respect to information based criterion and
likelihood ratio tests?
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
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
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,
2012 Jan 25
4
formula error inside function
I want use survfit() and basehaz() inside a function, but it doesn't work.
Could you take a look at this problem. Thanks for your help. Following is my
codes:
library(survival)
n <- 50 # total sample size
nclust <- 5 # number of clusters
clusters <- rep(1:nclust,each=n/nclust)
beta0 <- c(1,2)
set.seed(13)
#generate phmm data set
Z <- cbind(Z1=sample(0:1,n,replace=TRUE),
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