Re: [R] cumulative incidence for mstate in Survival package in R
Thanks a lot for the reply! On Tue, Dec 31, 2013 at 1:59 AM, Göran Broström goran.brost...@umu.sewrote: On 12/30/2013 11:04 PM, Jieyue Li wrote: Dear All, I want to have the cumulative incidence curves for 'mstate' data using Survival package in R. But I got some problems: I. Problem 1: 1. If I only use intercept without any covariates, I can have 'right' cumulative incidence curves (2 for 2 competing risks): library(Survival) That shouldn't work;) This is from an example from the Survival package... fitCI - survfit(Surv(stop, status*as.numeric(event), type=mstate) ~ 1,data=mgus1, subset=(start==0)) plot(fitCI) 2. If I include one variate ('sex'), I get 4 curves (attached; I guess because there are two levels in 'sex' and 2 competing risks): fitCI - survfit(Surv(stop, status*as.numeric(event), type=mstate) ~sex,data=mgus1, subset=(start==0)) plot(fitCI) However, I want to just have 2 cumulative incidence curves estimated from several covariates (such as 'sex', 'age', 'alb', etc. in mgus1). Could you please help me to do that? Thank you very much! I suggest that you check the Task Views, under 'Survival' and 'Multistate Models', for instance the 'cmprsk' and 'timereg' packages. II. Problem 2: I try using an example from sourcecode.pdf: fit - survfit(Surv(time, status, type=mstate) ~ sex, data=mine) but where can I have the 'mine' data? Thank you! Where do you find 'sourcecode.pdf'? It's from http://stat.ethz.ch/R-manual/R-patched/library/survival/doc/sourcecode.pdf Göran Broström Best, Jieyue __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/ posting-guide.html and provide commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] cumulative incidence for mstate in Survival package in R
Dear All, I want to have the cumulative incidence curves for 'mstate' data using Survival package in R. But I got some problems: I. Problem 1: 1. If I only use intercept without any covariates, I can have 'right' cumulative incidence curves (2 for 2 competing risks): library(Survival) fitCI - survfit(Surv(stop, status*as.numeric(event), type=mstate) ~ 1,data=mgus1, subset=(start==0)) plot(fitCI) 2. If I include one variate ('sex'), I get 4 curves (attached; I guess because there are two levels in 'sex' and 2 competing risks): fitCI - survfit(Surv(stop, status*as.numeric(event), type=mstate) ~sex,data=mgus1, subset=(start==0)) plot(fitCI) However, I want to just have 2 cumulative incidence curves estimated from several covariates (such as 'sex', 'age', 'alb', etc. in mgus1). Could you please help me to do that? Thank you very much! II. Problem 2: I try using an example from sourcecode.pdf: fit - survfit(Surv(time, status, type=’mstate’) ~ sex, data=mine) but where can I have the 'mine' data? Thank you! Best, Jieyue attachment: Rplot.png__ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] combine glmnet and coxph (and survfit) with strata()
check this one http://stackoverflow.com/questions/16299891/estimating-many-interaction-terms-in-glmnet On Mon, Dec 9, 2013 at 5:39 AM, Aaron Mackey ajmac...@gmail.com wrote: I'm also curious how to use glmnet with survfit -- specifically, for use with interval regression (which, under the hood, is implemented using survfit). Can you show how you converted your Surv object formula to a design matrix for use with glmnet? Thanks, -Aaron On Sun, Dec 8, 2013 at 12:45 AM, Jieyue Li jieyuel...@gmail.com wrote: Dear All, I want to generate survival curve with cox model but I want to estimate the coefficients using glmnet. However, I also want to include a strata() term in the model. Could anyone please tell me how to have this strata() effect in the model in glmnet? I tried converting a formula with strata() to a design matrix and feeding to glmnet, but glmnet just treats the strata() term with one independent variable... I know that if there is no such strata(), I can estimate coefficients from glmnet and use ...init=selectedBeta,iter=0) in the coxph. Please advise me or also correct me if I'm wrong. Thank you very much! Best, Jieyue [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] computational cost of the survpack or survival support vector machine package
Dear All, I'm trying using the survpack to apply support vector machines on survival analysis, but I find that it's very slow. I use a data frame with 1082 rows and 8 columns but it seems to run forever... Does anyone have any insight or suggestion to this or have better knowledge of another R package that can handle this? Thank you very much! Best, Jieyue [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] combine glmnet and coxph (and survfit) with strata()
Dear All, I want to generate survival curve with cox model but I want to estimate the coefficients using glmnet. However, I also want to include a strata() term in the model. Could anyone please tell me how to have this strata() effect in the model in glmnet? I tried converting a formula with strata() to a design matrix and feeding to glmnet, but glmnet just treats the strata() term with one independent variable... I know that if there is no such strata(), I can estimate coefficients from glmnet and use ...init=selectedBeta,iter=0) in the coxph. Please advise me or also correct me if I'm wrong. Thank you very much! Best, Jieyue [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] ask for Dimension reduction, Manifold Learning R-package
Dear All, Does anyone know whether there is a R package existed for dimension reduction (manifold learning) methods, especially like Laplacian Eigenmaps? Thanks a lot! Best, Jieyue [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.