
R version 3.6.2 (2019-12-12) -- "Dark and Stormy Night"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin19.2.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

Loading required package: survival
Loading required package: stats
[1] TRUE
> setwd('/Users/naras/tmp/dtest/')
> library(distcomp)
> uis <- readRDS("uis.RDS")
> coxOrig <- coxph(formula=Surv(time, censor) ~ age + becktota + ndrugfp1 + ndrugfp2 +
+ ivhx3 + race + treat + strata(site), data=uis)
> summary(coxOrig)
Call:
coxph(formula = Surv(time, censor) ~ age + becktota + ndrugfp1 + 
    ndrugfp2 + ivhx3 + race + treat + strata(site), data = uis)

  n= 575, number of events= 464 
   (53 observations deleted due to missingness)

               coef exp(coef)  se(coef)      z Pr(>|z|)    
age       -0.028076  0.972315  0.008131 -3.453 0.000554 ***
becktota   0.009146  1.009187  0.004991  1.832 0.066914 .  
ndrugfp1  -0.521973  0.593349  0.124424 -4.195 2.73e-05 ***
ndrugfp2  -0.194178  0.823512  0.048252 -4.024 5.72e-05 ***
ivhx3TRUE  0.263634  1.301652  0.108243  2.436 0.014868 *  
race      -0.240021  0.786611  0.115632 -2.076 0.037920 *  
treat     -0.212616  0.808466  0.093747 -2.268 0.023331 *  
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

          exp(coef) exp(-coef) lower .95 upper .95
age          0.9723     1.0285    0.9569    0.9879
becktota     1.0092     0.9909    0.9994    1.0191
ndrugfp1     0.5933     1.6853    0.4649    0.7572
ndrugfp2     0.8235     1.2143    0.7492    0.9052
ivhx3TRUE    1.3017     0.7683    1.0528    1.6093
race         0.7866     1.2713    0.6271    0.9867
treat        0.8085     1.2369    0.6728    0.9715

Concordance= 0.613  (se = 0.014 )
Likelihood ratio test= 50.62  on 7 df,   p=1e-08
Wald test            = 50.78  on 7 df,   p=1e-08
Score (logrank) test = 51.31  on 7 df,   p=8e-09

> coxDef <- data.frame(compType = names(availableComputations())[2],
+ he = FALSE,
+ formula = "Surv(time, censor) ~ age + becktota + ndrugfp1 + ndrugfp2 + ivhx3 + race + treat",
+ id = "UIS",
+ stringsAsFactors=FALSE)
> siteData <- with(uis, split(x=uis, f=site))
> nSites <- length(siteData)
> sites <- lapply(seq.int(nSites),
+ function(x) list(name = paste0("site", x),
+ url = "http://localhost:5656/ocpu"))
> ok <- Map(uploadNewComputation, sites,
+ lapply(seq.int(nSites), function(i) coxDef),
+ siteData)
> stopifnot(all(as.logical(ok)))
> master <- CoxMaster$new(defn = coxDef)
> for (site in sites) {
+ master$addSite(name = site$name, url = site$url)
+ }
> result <- master$run()
> master$summary()
          coef exp(coef)    se(coef)         z            p
1 -0.028049470 0.9723403 0.008130079 -3.450086 5.604085e-04
2  0.009144073 1.0091860 0.004991809  1.831815 6.697892e-02
3 -0.521929613 0.5933745 0.124424010 -4.194766 2.731534e-05
4 -0.194170852 0.8235172 0.048250722 -4.024206 5.716782e-05
5  0.263637628 1.3016564 0.108244755  2.435570 1.486837e-02
6 -0.240060918 0.7865799 0.115631911 -2.076078 3.788670e-02
7 -0.212571963 0.8085021 0.093746552 -2.267518 2.335862e-02
> print(master$summary(), digits=5)
        coef exp(coef)  se(coef)       z          p
1 -0.0280495   0.97234 0.0081301 -3.4501 5.6041e-04
2  0.0091441   1.00919 0.0049918  1.8318 6.6979e-02
3 -0.5219296   0.59337 0.1244240 -4.1948 2.7315e-05
4 -0.1941709   0.82352 0.0482507 -4.0242 5.7168e-05
5  0.2636376   1.30166 0.1082448  2.4356 1.4868e-02
6 -0.2400609   0.78658 0.1156319 -2.0761 3.7887e-02
7 -0.2125720   0.80850 0.0937466 -2.2675 2.3359e-02
> sessionInfo()
R version 3.6.2 (2019-12-12)
Platform: x86_64-apple-darwin19.2.0 (64-bit)
Running under: macOS Catalina 10.15.2

Matrix products: default
BLAS/LAPACK: /usr/local/Cellar/openblas/0.3.7/lib/libopenblasp-r0.3.7.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] graphics  grDevices datasets  stats     utils     methods   base     

other attached packages:
[1] distcomp_1.3   survival_3.1-8 rmarkdown_2.0  knitr_1.26     pkgdown_1.4.1 
[6] devtools_2.2.1 usethis_1.5.1 

loaded via a namespace (and not attached):
 [1] tidyselect_0.2.5  xfun_0.11         remotes_2.1.0     purrr_0.3.3      
 [5] splines_3.6.2     lattice_0.20-38   sodium_1.1        testthat_2.3.1   
 [9] htmltools_0.4.0   gmp_0.5-13.5      rlang_0.4.2       pkgbuild_1.0.6   
[13] later_1.0.0       pillar_1.4.3      glue_1.3.1        withr_2.1.2      
[17] sessioninfo_1.1.1 stringr_1.4.0     homomorpheR_0.2-4 evaluate_0.14    
[21] memoise_1.1.0     callr_3.4.0       fastmap_1.0.1     httpuv_1.5.2     
[25] ps_1.3.0          curl_4.3          fansi_0.4.0       Rcpp_1.0.3       
[29] xtable_1.8-4      backports_1.1.5   promises_1.1.0    desc_1.2.0       
[33] pkgload_1.0.2     jsonlite_1.6      mime_0.8          fs_1.3.1         
[37] digest_0.6.23     stringi_1.4.3     processx_3.4.1    dplyr_0.8.3      
[41] shiny_1.4.0       grid_3.6.2        rprojroot_1.3-2   cli_2.0.0        
[45] tools_3.6.2       magrittr_1.5      tibble_2.1.3      crayon_1.3.4     
[49] pkgconfig_2.0.3   MASS_7.3-51.5     ellipsis_0.3.0    Matrix_1.2-18    
[53] prettyunits_1.0.2 assertthat_0.2.1  httr_1.4.1        R6_2.4.1         
[57] compiler_3.6.2   
> q()

Process R finished at Tue Jan 21 11:00:59 2020
