View source: R/ds.cox.zphSLMA.R
ds.cox.zphSLMA | R Documentation |
This function tests the proportional hazards assumption for a Cox proportional hazards model.
ds.cox.zphSLMA(
fit = NULL,
transform = "km",
terms = TRUE,
singledf = FALSE,
global = TRUE,
datasources = NULL
)
fit |
character string (potentially including |
transform |
character string specifying how the survival times should be transformed before the test is performed. Possible values are "km", "rank", "identity" or a function of one argument. |
terms |
logical if TRUE, do a test for each term in the model rather than for each separate covariate. For a factor variable with k levels, for instance, this would lead to a k-1 degree of freedom test. The plot for such variables will be a single curve evaluating the linear predictor over time. |
singledf |
logical use a single degree of freedom test for terms that have multiple coefficients, i.e., the test that corresponds most closely to the plot. If terms=FALSE this argument has no effect. |
global |
logical should a global chi-square test be done, in addition to the per-variable or per-term tests tests. |
datasources |
a list of |
This is a function that performs diagnostics on a fitted Cox proportional hazards model.
Server function called: cox.zphSLMADS
.
cox.zphSLMADS
returns to the client-side the diagnostics of
the Cox proportional hazards model
Soumya Banerjee and Tom Bishop, 2021
## Not run:
## Version 1.0.0
# connecting to the Opal servers
require('DSI')
require('DSOpal')
require('dsBaseClient')
builder <- DSI::newDSLoginBuilder()
builder$append(server = "study1",
url = "http://192.168.56.100:8080/",
user = "administrator", password = "datashield_test&",
table = "SURVIVAL.EXPAND_NO_MISSING1", driver = "OpalDriver")
builder$append(server = "study2",
url = "http://192.168.56.100:8080/",
user = "administrator", password = "datashield_test&",
table = "SURVIVAL.EXPAND_NO_MISSING2", driver = "OpalDriver")
builder$append(server = "study3",
url = "http://192.168.56.100:8080/",
user = "administrator", password = "datashield_test&",
table = "SURVIVAL.EXPAND_NO_MISSING3", driver = "OpalDriver")
logindata <- builder$build()
connections <- DSI::datashield.login(logins = logindata, assign = TRUE, symbol = "D")
# make sure that the outcome is numeric
ds.asNumeric(x.name = "D$cens",
newobj = "EVENT",
datasources = connections)
ds.asNumeric(x.name = "D$survtime",
newobj = "SURVTIME",
datasources = connections)
dsSurvivalClient::ds.Surv(time='SURVTIME', event='EVENT', objectname='surv_object')
dsSurvivalClient::ds.coxph.SLMA(formula = 'surv_object ~ D$female',
dataName = 'D', datasources = connections)
# clear the Datashield R sessions and logout
datashield.logout(connections)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.