similar to: speeding up 1000s of coxph regression?

Displaying 20 results from an estimated 10000 matches similar to: "speeding up 1000s of coxph regression?"

2003 Nov 27
2
Getting rid of loops?
I wrote a function to calculate cosine distances between rows of a matrix. It uses two loops and is slow. Any suggestions to speed this up? Thanks in advance. theta.dist <- function(x){ res <- matrix(NA, nrow(x), nrow(x)) for (i in 1:nrow(x)){ for(j in 1:nrow(x)){ if (i > j) res[i, j] <- res[j, i] else { v1 <- x[i,] v2 <- x[j,]
2006 Jan 17
2
help with parsing multiple coxph() results
Dear All: I have a question on using coxph for multiple genes: I have written code to loop through all 22283 genes in the Hgu-133A and apply coxph on survival data. However, I don't know how to work with the result for each gene: survtest<-coxph(Surv(pcc.primary.stg.3.cox[,'fup_interval'],pcc.primary.stg.
2011 Mar 13
1
using pre-calculated coefficients and LP in coxph()?
I need to force a coxph() function in R to use a pre-calculated set of beta coefficients of a gene signature consisting of xx genes and the gene expression is also provided of those xx genes. If I try to use "coxph()" function in R using just the gene expression data alone, the beta coefficients and coxph$linear.predictors will change and I need to use the pre-calcuated linear predictor
2003 Sep 27
3
coloring dendrgram in heatmap?
Using the heatmap function in mva, it seems to be hard to use different colors in the edges leading to different groups of objects, as commonly done in many heatmaps in the microarray graphics. Any suggestions? Thanks. max
2008 Jun 17
3
Capturing coxph warnings and errors
Hi, I have a script that takes a subset of genes on a microarray and tries to fit a coxph model to the expression values for each gene. This seems to work fine but in some cases it produces warnings and/or errors. For example: Error in fitter(X, Y, strats, offset, init, control, weights = weights, : NA/NaN/Inf in foreign function call (arg 6) In addition: Warning message: In fitter(X, Y,
2008 Feb 12
2
Cox model
Hello R-community, It's been a week now that I am struggling with the implementation of a cox model in R. I have 80 cancer patients, so 80 time measurements and 80 relapse or no measurements (respective to censor, 1 if relapsed over the examined period, 0 if not). My microarray data contain around 18000 genes. So I have the expressions of 18000 genes in each of the 80 tumors (matrix
2004 Jul 29
3
fitting gaussian mixtures
Hi R-helpers, I'm trying to model a univariate as a bi-modal normal mixtures. I need to estimate the parameters of each gaussian (mean and sd) and their weights. What's the best way to do this in R? Thanks, Xiao-Jun
2006 Dec 29
2
Survfit with a coxph object
I am fitting a coxph model on a large dataset (approx 100,000 patients), and then trying to estimate the survival curves for several new patients based on the coxph object using survfit. When I run coxph I get the coxph object back fairly quickly however when I try to run survfit it does not come back. I am wondering if their is a more efficient way to get predicted survival curves from a coxph
2004 Dec 17
1
package.skeleton()
Hi, R people: I generated a package using package.skeleton(). But I can not load it using library(). > package.skeleton("RDIPcor", list = c("ROCAUC.i", "cor.i"), path = "/home/xiao") Creating directories ... Creating DESCRIPTION ... Creating READMEs ... Saving functions and data ... Making help files ... Done. Further steps are described in
2009 Aug 12
1
psi not functioning in nlrob?
Hi all, I'm trying to fit a nonlinear regression by "nlrob": model3=nlrob(y~a1*x^a2,data=transient,psi=psi.bisquare, start=list(a1=0.02,a2=0.7),maxit=1000) However an error message keeps popping up saying that the function psi.bisquare doesn't exist. I also tried psi.huber, which is supposed to be the default for nlrob: model3=nlrob(y~a1*x^a2,data=transient,psi=psi.huber,
2010 Feb 05
1
Using coxph with Gompertz-distributed survival data.
Dear list: I am attempting to use what I thought would be a pretty straightforward practical application of Cox regression. I figure users of the survival package must have come across this problem before, so I would like to ask you how you dealt with it. I have set up an illustrative example and included it at the end of this post. I took a sample of 100 data points from each of two populations
2012 Jul 06
1
How to compute hazard function using coxph.object
My question is, how to compute hazard function(H(t)) after building the coxph model. I even aware of the terminology that differs from hazard function(H(t)) and the hazard rate(h(t)). Here onward I wish to calculate both. Here what I have done in two different methods; ##########################################################################################
2010 Jul 30
1
COXPH: how to get the score test and likelihood ratio test for a specific variable in a multivariate Coxph ?
Hello, I would like to get the likelihood ratio and score tests for specific variables in a multivariate coxph model. The default is Wald, so the tests for each separate variable is based on Wald's test. I have the other tests for the full model but I don't know how to get them for each variable. Any idea? David Biau. [[alternative HTML version deleted]]
2004 Oct 26
2
vcov method for 'coxph' objects
Dear all, The help file for the generic function vcov states "Classes with methods for this function include: 'lm', 'glm', 'nls', 'lme', 'gls', 'coxph' and 'survreg' (the last two in package 'survival')." Since, I am not able to use vcov.coxph(), I am wondering whether I am missing something (as I suspect..) regards, vito
2008 Apr 18
1
Overall p-value from a factor in a coxph fit
Hi all. If I run the simple regression when x is a categorical variable ( x <- factor(x) ): > MyFit <-coxph( Surv(start, stop, event) ~ x ) How can I get the overall p-value on x other than for each dummy variable? > anova(MyFit) does NOT provide that information as previously suggested on the list. All the best, Kare [[alternative HTML version deleted]]
2004 Mar 05
1
Application of step to coxph using method="exact" (PR#6646)
Full_Name: John E. Kolassa Version: Version 1.8.1 OS: Solaris Submission from: (NULL) (128.6.76.36) Stepwise model selection for coxph appears to fail with method="exact". The code step(coxph(Surv(1:100,rep(1,100))~factor(rep(1:4,25)),method="exact")) produces the error message Start: AIC= 733.07 Surv(1:100, rep(1, 100)) ~ factor(rep(1:4, 25)) Error in
2011 Mar 01
1
glht() used with coxph()
Hi, I am experimenting with using glht() from multcomp package together with coxph(), and glad to find that glht() can work on coph object, for example: > (fit<-coxph(Surv(stop, status>0)~treatment,bladder1)) coxph(formula = Surv(stop, status > 0) ~ treatment, data = bladder1) coef exp(coef) se(coef) z p treatmentpyridoxine -0.063 0.939 0.161
2010 Apr 20
3
Help: coxph() in {survival} package
Hi All, I'm runnning coxph() on 90 different datasets (in a loop). 1. I'm wondering how can I get "log-likelihood" value from coxph() output. Currently I can only see following: Likelihood ratio test = Wald test = Score (logrank) test = 2. Once I have likelihood value, I would like to extract these from R output (for each data set). Can any one help please, thanks in
2004 Mar 11
5
Receiver Operator Characteristic curve
Dear R-helpers: I want to calculate area under a Receiver Operator Characteristic curve. Where can I find related functions? Thank you in advance Xiao
2007 Nov 08
2
mapply, coxph, and model formula
Hello - I am wanting to create some Cox PH models with coxph (in package survival) using different datasets. The code below illustrates my current approach and problem with completing this. ### BEGIN R SAMPLE CODE ############################## library(survival) #Define a function to make test data makeTestDF <- function(n) { times <- sample(1:200, n, replace = TRUE) event