similar to: a question for beginner

Displaying 20 results from an estimated 400 matches similar to: "a question for beginner"

2011 Nov 30
1
Nomogram with stratified cph in rms package, how to get failure probability
Hello, I am using Dr. Harrell's rms package to make a nomogram. I was able to make a beautiful one. However, I want to change 5-year survival probability to 5-year failure probability. I couldn?t get hazard rate from Hazard(f1) because I used cph for the model. Here is my code: library(rms) f1 <- cph(Surv(retime,dfs) ~ age+her2+t_stage+n_stage+er+grade+cytcyt+Cyt_PCDK2 , data=data11,
2011 Nov 30
0
formula for calculating the survival probability for nomogram
Hi, I used Dr. Harrell's rms package to make a nomogram. Below is my code for nomogram and calculate total points and probability *in original data set* used for building the nomogram. *My question is how I get the formula for calculating the survival probability for this nomogram. Then I can use this formula to do validation by using other data set. * f1 <- cph(Surv(retime,dfs) ~
2009 Aug 01
2
Cox ridge regression
Hello, I have questions regarding penalized Cox regression using survival package (functions coxph() and ridge()). I am using R 2.8.0 on Ubuntu Linux and survival package version 2.35-4. Question 1. Consider the following example from help(ridge): > fit1 <- coxph(Surv(futime, fustat) ~ rx + ridge(age, ecog.ps, theta=1), ovarian) As I understand, this builds a model in which `rx' is
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,
2009 Feb 06
1
Using subset in validate() in Design, what is the correct syntax?
Hi I am trying to understand how to get the validate() function in Design to work with the subset option. I tried this: ovarian.cph=cph(Surv(futime, fustat) ~ age+factor(ecog.ps)+strat(rx), time.inc=1000, x=T, y=T, data=ovarian) validate(ovarian.cph) #fine when no subset is used, but the following two don't work: > validate(ovarian.cph, subset=ovarian$ecog.ps==2) Error in
2005 Nov 27
1
the output of coxph
Dear All: I have some questions about the output of coxph. Below is the input and output: ---------------------------------------- > coxph(formula = Surv(futime, fustat) ~ age + rx + ecog.ps, data = + ovarian, x = TRUE) Call: coxph(formula = Surv(futime, fustat) ~ age + rx + ecog.ps, data = ovarian, x = TRUE) coef exp(coef) se(coef) z p age 0.147 1.158
2012 Sep 19
2
write.table: strange output has been produced
Good afternoon all - While making a steady progress in learning R after Matlab I encountered a problem which seems to require some extra help to move over. Basically I want to merge a data from biological statistical dataset with annotation data extracted from another dataset using an 'id' crossreference and write it to report file. The first part goes absolutely fine, I have merged both
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
2011 Nov 29
2
Nomogram with stratified cph in Design package-- failure probability
Hello, I am using Dr. Harrell's design package to make a nomogram. I was able to make a beautiful one. However, I want to change 5-year survival probability to 5-year failure probability. I couldn?t get hazard rate from Hazard(f1) because I used cph for the model. Here is my code: f1 <- cph(Surv(retime,dfs) ~ age+her2+t_stage+n_stage+er+grade+cytcyt+Cyt_PCDK2 , data=data11, surv=T,
2010 Feb 16
1
survival - ratio likelihood for ridge coxph()
It seems to me that R returns the unpenalized log-likelihood for the ratio likelihood test when ridge regression Cox proportional model is implemented. Is this as expected? In the example below, if I am not mistaken, fit$loglik[2] is unpenalized log-likelihood for the final estimates of coefficients. I would expect to get the penalized log-likelihood. I would like to check if this is as expected.
2003 Feb 27
2
interval-censored data in survreg()
I am trying to fit a lognormal distribution on interval-censored data. Some of my intervals have a lower bound of zero. Unfortunately, it seems like survreg() cannot deal with lower bounds of zero, despite the fact that plnorm(0)==0 and pnorm(-Inf)==0 are well defined. Below is a short example to reproduce the problem. Does anyone know why survreg() must behave that way? Is there an alternate
2011 Oct 29
1
How to plot survival data from multiple trials (simulations)?
Dear all: Could anyone please provide some R codes to plot the below survival data to compare two groups (0 vs 1) after 2 simulations (TRL)? need 95% prediction interval on the plot from these 2 trials. I would like to simulate 1000 trials later. Thanks a lot for your great help and consideration! yan TRL ID ECOG BASE PTR8 GROUP POP ST ind 1 1 1 1 2.2636717 0.255634126 1 1 99.4 F 3 1 2 1
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
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
2011 Jan 24
1
How to measure/rank ?variable importance when using rpart?
--- included message ---- Thus, my question is: *What common measures exists for ranking/measuring variable importance of participating variables in a CART model? And how can this be computed using R (for example, when using the rpart package)* ---end ---- Consider the following printout from rpart summary(rpart(time ~ age + ph.ecog + pat.karno, data=lung)) Node number 1: 228 observations,
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)
2008 Nov 14
3
Change Confidence Limits on a plot
Hi, I am attempting to set the confidence limits on a ls means plot as follows: mult<-glht(lm(effectModel, data=statdata, na.action = na.omit), linfct=mcp(mainEffect="Means")) meanPlot <- sub(".html", "meanplot.jpg", htmlFile) jpeg(meanPlot) plot(mult, main=NA, xlab=unlist(strsplit(Args[4],"~"))[1]) This produces 95% CIs by default but I would
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
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 Sep 13
1
coxph.detail() does not work
Hello everyone, I tried to use coxph.detail() to get the hazard function. But a warning messge always returns to me, even in the example provided by its help document: > ?coxph.detail > fit <- coxph(Surv(futime,fustat) ~ age + rx + ecog.ps, ovarian, x=TRUE) > fitd <- coxph.detail(fit) Warning message: data length [37] is not a sub-multiple or multiple of the number of rows