search for: cumhaz

Displaying 18 results from an estimated 18 matches for "cumhaz".

Did you mean: culhan
2007 Jun 28
0
WEIBULL FRAILTY MODEL HELP
...uven below. ( The data comes from Keiding and Klein artricle published in the Statistics in Medicine 1996) . While the simple weibull model runs perfectly ( I get -2*loglikelihood 1093,905), the weibull frailty model does not run well. The code I write is : likelihood.weibul <- function(p) { cumhaz <- exp(x1*p[4])*(timeto^p[2])/p[1] cumhaz <- sum(cumhaz) lnhaz <- (x1*p[4]+log((p[2]*timeto^(p[2]-1))/p[1]))*stat lik <- p[3]*log(p[3])-log(gamma(p[3]))+sum(lnhaz)+ log(gamma(di+p[3]))-(p[3]+di)*log(p[3]+cumhaz) -2*lik } di <-sum(stat) initial<-c(500000,2.8,.5,1.8) # initial 1/exp...
2007 Oct 29
3
using survfit
...bind(m,act.surv.time) m<-cbind(m,0) m[m[,3]<m[,4],6]<-1 colnames(m)[6]<-"censoring" m b=data.frame(m) d2=survfit(Surv(act.surv.time,censoring)~treatgrp,data=b,type=c("fleming-harrington"), ) plot(d2, lty=2:3, fun="cumhaz", xlab="Months", ylab="Cumulative Hazard") d1=survfit(Surv(act.surv.time,censoring)~treatgrp,data=b,) plot(d1, lty=2:3, xlab="Months", ylab="survival curves") I only see the plot of d1 what happens to d2 and how do l view it....
2011 Mar 07
0
survest() for cph() in Design package
...rstime2: indicator variable to indicate whether age is below 50, 50-69 or >=70, used as strata in the model The SAS code is (if this helps to address my question/problem) proc phreg data=uminers; model rstime*cc(0)=cr500 smoke25/ entry=rsentry offset=logw rl; baseline out=ch covariates=covs cumhaz=cumhaz stdcumhaz=secumhaz lowercumhaz=lci uppercumhaz=uci/ nomean; strata rstime2; run; My R code is: library(survival) library(Design) > uminers<-read.table("uminers.txt",sep='\t',header=T,row.names=NULL) > fit <- cph(Surv(rsentry,rstime,cc)~cr500+smoke25+strat...
2006 Mar 16
0
Having trouble with plot.survfit and fun="cloglog"
...0 1 67 1 68 1 82 1 82 1 86 0 86 0 89 1 93 0 97 1 100 0 100 0 100 0 > library(survival) Loading required package: splines > eg1.km <- survfit(Surv(days,status),data=eg1) > plot(eg1.km,mark.time=FALSE,conf.int=FALSE) # Works > plot(eg1.km,mark.time=FALSE,conf.int=FALSE,fun="cumhaz") # Works > plot(eg1.km,mark.time=FALSE,conf.int=FALSE,fun="cloglog") # Error Error in rep.default(2, n2 - 1) : invalid number of copies in rep() In addition: Warning message: 2 x values <= 0 omitted from logarithmic plot in: xy.coords(x, y, xlabel, ylabel , log) The axes...
2002 Aug 02
1
survival analysis: plot.survfit
...sn't it? #Example: motorette <- read.table("http://stat.ethz.ch/Teaching/Datasets/NDK/motorette.dat",header=T) km <- survfit(Surv(time,status)~1,data=motorette,type="kaplan-meier") plot(km,fun="cloglog") # Error message and wrong scales plot(km,fun="cumhaz",log="xy") # Does the same. #If I do the plot "by hand", it does work: log.cum.H <- log(-log(km$surv)) log.t <- log(summary(km,censored=T)$time) plot(log.t,log.cum.H,type="s") regards Ruth -- Ruth Meili <meili at stat.math.ethz.ch> Seminar fuer St...
2006 Mar 07
1
breslow estimator for cumulative hazard function
...each stratum. As far as i know, if the proportionality assumption holds, the plot of ln[H(t)] of each stratum versus time should be approximately parallel. i.e fit<-coxph(Surv(start,end,status)~sx+rated+AGLEVEL+strata(Z1),data=ALLDPinfectionandbronchitis) ss<-survfit(fit) plot(ss,fun="cumhaz") My question is on whether the cumulative hazard given by the above command is actually a breslow estimator for baseline cumulative hazard ,i.e, estimator=sum( number of death/ (sum(risk score in risk set)) or a nelson-Aalen estimator. if the above command does not give me breslow estima...
2011 Jan 16
1
Help in Coxme
I am a relative newbie to survival analysis and R in general, but would like to use the coxme package to analyse some data I currently have. The data is relative to survival times of drosophila melanogaster populations to infection with pathogens, and has the variables: Time, Status, Treatment (4 treatments + 2 controls) Population Replicate ?and I'm currently using the following call
2015 Aug 02
3
ayuda con análisis de supervivencia
...oxph(surv2~relevel(dfx$apoe4,ref='no-E4'))) }) sapply(levels(df0$bmi0),function (x){ #####CUMULATIVE HAZARDs dfx=filter(df0,bmi0==x) surv2=Surv(dfx$bmi,dfx$MetS) km2=survfit(surv2~dfx$apoe4) plot(km2,lty=2:1,xlim=c(20,41),xlab='BMI at onset',main=x,mark.time = F,fun='cumhaz') legend('topleft',c('E4','no-E4'),lty=2:1) }) Muchas gracias y un saludo Jose Miguel ------------------------------------------------------------------- Jose Miguel Arbones-Mainar, PhD Unidad de Investigación Traslacional Instituto Aragones de Ciencias de la S...
2013 Feb 12
0
error message from predict.coxph
...indx2, ] # *** SHOULD BE JUST xbar # se[indx2] <- sqrt(varh + rowSums((dt %*% object$var) * dt)) * newrisk[indx2] # } #} #else { # j2 <- approx(afit$time, 1:afit.n, newy[indx2, 2], method = "constant", f = 0, yleft = 0, yright = afit.n)$y # chaz2 <- approx(-afit$time, afit$cumhaz, -newy[indx2, 2], method = "constant", rule = 2, f = 0)$y # chaz2 <- c(0, afit$cumhaz)[j2 + 1] # pred[indx2] <- (chaz2 - chaz) * newrisk[indx2] # if (se.fit) { # varh2 <- c(0, cumsum(afit$varhaz))[j1 + 1] # xbar2 <- rbind(0, afit$xbar)[j1 + 1, , drop = F] # dt <...
2009 Jun 20
1
Plotting Cumulative Hazard Functions with Strata
Hello: So i've fit a hazard function to a set of data using kmfit<-survfit(Surv(int, event)~factor(cohort)) this factor variable, "cohort" has four levels so naturally the strata variable has 4 values. I can use this data to estimate the hazard rate haz<-n.event/n.risk and calculate the cumulative hazard function by H<--log(haz) Now, I would like to plot this
2013 Apr 11
0
plotting the cumulative hazard function of a process whose intensity function is specified
...[k] <l(u)/ld(u)){ k<-k+1 u<-u+re[k] y[i]<-u k<-k+1 } cen<-rexp(n,rate=lamc) } obj<-Surv(floor(pmin(y,cen)),ifelse(y<-cen,1,0)) u<-gendata(n,lamc,k1,k2) lsurv2<-survfit(Surv(floor(pmin(y,cen)) ~ x, data = u) plot(lsurv2,fun='cumhaz',xlab='temps',ylab='has',noconf) [[alternative HTML version deleted]]
2008 Aug 15
1
estimating the proportion without recurring ailment based on the nelson-aalen estimator
Dear useRs, I'm trying to estimate the proportion of individuals with a without a certain recurring ailment at several times points. The data are of the survival type, with "start"-"stop" dates and whether the individual had the ailment in that interval. Some cases are observed until database closure and some died or are lost to followup. The interest is not on death. I
2012 Oct 11
2
Question on survival
Hi, I'm going crazy trying to plot a quite simple graph. i need to plot estimated hazard rate from a cox model. supposing the model i like this: coxPhMod=coxph(Surv(TIME, EV) ~ AGE+A+B+strata(C) data=data) with 4 level for C. how can i obtain a graph with 4 estimated (better smoothed) hazard curve (base-line hazard + 3 proportional) to highlight the effect of C. thanks!! laudan [[alternative
2012 Apr 29
0
need help with avg.surv (Direct Adjusted Survival Curve)
...<- 2 larynx <- cbind(larynx, year.larynx) head(larynx) summary(larynx) kapmeier.fit <- survfit( Surv(time, death) ~ stage, data = larynx, type = "kaplan-meier") sumkap <- summary(kapmeier.fit) attributes(kapmeier.fit) attributes(sumkap) plot(kapmeier.fit, lty=2:3, fun="cumhaz",  xlab="Months",ylab="Cumulative Hazard of death")  legend(4,.4,c("stage1","stage2","stage3","stage4"),lty=1:2) plot(kapmeier.fit, lty=2:3,  xlab="Months",ylab="Survival Function")  #construct a data frame for th...
2001 Feb 22
3
[newbie] Cox Baseline Hazard
Hello everybody. First of all, I would like to present myself. I'm a french student in public health and I like statistics though I'm not that good in mathematics (but I try to catch up). I've discovered R recently while trying to find a statistical program in order to avoid rebooting my computer under windows when I need to do some statistical work. And here is my first question.
2012 Apr 30
0
need help with avg.surv (Direct Adjusted Survival Curve), Message-ID:
...<- 2 larynx <- cbind(larynx, year.larynx) head(larynx) summary(larynx) kapmeier.fit <- survfit( Surv(time, death) ~ stage, data = larynx, type = "kaplan-meier") sumkap <- summary(kapmeier.fit) attributes(kapmeier.fit) attributes(sumkap) plot(kapmeier.fit, lty=2:3, fun="cumhaz", xlab="Months",ylab="Cumulative Hazard of death") legend(4,.4,c("stage1","stage2","stage3","stage4"),lty=1:2) plot(kapmeier.fit, lty=2:3, xlab="Months",ylab="Survival Function") #construct a data frame for the pl...
2000 Jun 08
7
R Equivalent to matlab's find() command?
hi, Just a very simple question: is there an R equivalent to the matlab command find(X) which returns the indices of vector X that store non-zero elements? e.g. > find( [1 0 0 1 0]) ans = 1 4 so, in R, how do I do: ans <- rfind( c(1,0,0,1,0)) so that ans is the vector c(1,4) thanks, stephen -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help
2006 Mar 08
0
survival
...ach stratum. As far as i know, if the proportionality assumption holds, the plot of ln[H(t)] of each stratum versus time should be approximately parallel. i.e fit<-coxph(Surv(start,end,status)~sx+rated+AGLEVEL+strata(Z1),data=ALLDP infectionandbronchitis) ss<-survfit(fit) plot(ss,fun="cumhaz") My question is on whether the cumulative hazard given by the above command is actually a breslow estimator for baseline cumulative hazard ,i.e, estimator=sum( number of death/ (sum(risk score in risk set)) or a nelson-Aalen estimator. if the above command does not give me breslow estima...