HI,
It is me again! I try to fix below problem by adding the following term into
coxph function and now I am getting the following message! Can anybody help me
solve this problem?
Thank you ind advance for your help!
Regards,
Latha
Message I am getting now is
"Cannot coerce mode list to integer: list(eps = 1e-006, toler.chol =
1.81898940354586e-012, iter.max = 15, toler.inf = 0.001, outer.max = 10,....."
the code I was running:
methd1 <- function(n, b, t)
{
x <- runif(n, 0, 1)
y <- 1 - exp( - t)^exp(b * x)
c <- runif(n, 0, 0.5)
ttt <- ifelse(y <= c, y, c)
delt <- ifelse(y <= c, 1, 0)
datmethod1 <- data.frame(x, ttt, delt)
ss <- Surv(ttt, delt)
cox.fun <- coxph(Surv(ttt, delt) ~ x, datmethod1, weights = 1,
coxph.control(eps = 1e-006, iter.max
= 15))
cox.fun
}
> -----Original Message-----
> From: Latha Raja
> Sent: December 9, 2003 8:07 AM
> To: 's-news@wubios.wustl.edu'
> Subject: coxph problem (ran out of iteration...)
>
> Hi there,
> I was wondering whether you will be able to help me find the solution to the
> following problem I am facing.
> I am getting the following warning message when I was using the coxph in
> SPLUS and I am not sure why and where it is happening. I have also printed
> my code so you can see what I did to receive this warning.
>
> I would really appreciate if any of you can find out the solution for me:-)
>
> Regards,
> Latha
>
>
>
> Warning messages:
> Ran out of iterations and did not converge in:
> fitter(X, Y, strats, offset, init, control,
> weights ....
> >
>
>
> Code I used:
> > n<-30
> > b<-2 #Cox regression parameter
> > t<-0.106 #Value of t at which the function S(.) is studied
> > x<-runif(n,0,1) # covariate value
> > y<-1-exp(-t)^exp(b*x) #Survival time created from 1-(1-F(t))^exp(b*x)
> > c<-runif(n,0,0.5)
> > for (i in 1:n) ttt[i]<- min(y[i],c[i])
> > for (j in 1:n) if (y[j]<=c[j]) delt[j]=1 else delt[j]=0
> > data30106<-data.frame(x=x,ttt=ttt,delt=delt)
> > data30106
> x ttt delt
> 1 0.488711202 0.13562690 0
> 2 0.855828642 0.33931078 0
> 3 0.931598405 0.20061720 0
> 4 0.292845422 0.17337203 1
> 5 0.958126171 0.09910074 0
> 6 0.044562074 0.06945480 0
> 7 0.201170894 0.14658059 1
> 8 0.165116648 0.12390505 0
> 9 0.231906470 0.15511377 1
> 10 0.013588991 0.06923096 0
> 11 0.447032066 0.22831198 1
> 12 0.059958322 0.11264017 1
> 13 0.007346802 0.10198546 1
> 14 0.479377087 0.23039922 0
> 15 0.156308175 0.03428859 0
> 16 0.794690335 0.33846672 0
> 17 0.738001760 0.29515082 0
> 18 0.381364945 0.20329983 1
> 19 0.591780599 0.01012725 0
> x ttt delt
> 20 0.765888012 0.38724433 0
> 21 0.445477461 0.12077320 0
> 22 0.028177253 0.02744334 0
> 23 0.908368614 0.07864741 0
> 24 0.647047109 0.23249965 0
> 25 0.142004033 0.05859883 0
> 26 0.452978511 0.09875219 0
> 27 0.342493692 0.18964039 1
> 28 0.444275566 0.22721162 1
> 29 0.971535333 0.14329526 0
> 30 0.519449620 0.05668219 0
> > Surv(ttt,delt)
> [1] 0.13562690+ 0.33931078+ 0.20061720+ 0.17337203
> [5] 0.09910074+ 0.06945480+ 0.14658059 0.12390505+
> [9] 0.15511377 0.06923096+ 0.22831198 0.11264017
> [13] 0.10198546 0.23039922+ 0.03428859+ 0.33846672+
> [17] 0.29515082+ 0.20329983 0.01012725+ 0.38724433+
> [21] 0.12077320+ 0.02744334+ 0.07864741+ 0.23249965+
> [25] 0.05859883+ 0.09875219+ 0.18964039 0.22721162
> [29] 0.14329526+ 0.05668219+
> > coxph(Surv(ttt,delt)~x)
> Call:
> coxph(formula = Surv(ttt, delt) ~ x)
>
>
> coef exp(coef) se(coef) z p
> x -355 6.1e-155 805 -0.441 0.66
>
> Likelihood ratio test=43.9 on 1 df, p=3.53e-011 n=
> 30
> Warning messages:
> Ran out of iterations and did not converge in:
> fitter(X, Y, strats, offset, init, control,
> weights ....
> >
>
|