You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
z:0.004
Pr(>|z|):0.997
Warning message:
In fitter(X, Y, istrat, offset, init, control, weights = weights, :
Loglik converged before variable 1 ; coefficient may be infinite.
coxph result for julia:
z:Inf
Pr(>|z|):<1e-99
Why is there such a big difference between the R and julia and which one should be trusted?
##################the test run code for R and julia################Rcode
library(survival)
test1<- read.csv(file='/Users/guan.wang/Downloads/coxph_testdata.csv',sep="\t")
re<-coxph(Surv(survivalMonth, survivalEvent) ~myclass, test1)
summary(re)
##R outputs:Warningmessage:In fitter(X, Y, istrat, offset, init, control, weights=weights, :Loglikconvergedbeforevariable1 ; coefficientmaybeinfinite.> summary(re)
Call:
coxph(formula= Surv(survivalMonth, survivalEvent) ~myclass,
data=test1)
n=148, numberofevents=41coef exp(coef) se(coef) z Pr(>|z|)
myclass1.948e+012.885e+084.568e+030.0040.997
exp(coef) exp(-coef) lower.95upper.95myclass2884593493.467e-090InfConcordance=0.623 (se=0.02 )
Likelihoodratiotest=23.75on1df, p=1e-06Waldtest=0on1df, p=1
Score (logrank) test=13.8on1df, p=2e-04#########
## julia code:
rossi = CSV.read("coxph_testdata.csv", DataFrame,header=1,delim="\t",)
rossi.event =EventTime.(rossi.survivalMonth, rossi.survivalEvent .==1)
outcome =coxph(@formula(event ~ myclass), rossi)
outcome_coefmat =coeftable(outcome)
print(outcome_coefmat)
## julia output:
Estimate Std.Error z value Pr(>|z|)
───────────────────────────────────────────────
myclass 35.46170.0Inf<1e-99
───────────────────────────────────────────────
The text was updated successfully, but these errors were encountered:
coxph_testdata.csv
coxph result for R:
coxph result for julia:
Why is there such a big difference between the R and julia and which one should be trusted?
The text was updated successfully, but these errors were encountered: