ds.vcov.coxph: Returns a variance-covariance matrix for a Cox proportional...

View source: R/ds.vcov.coxph.R

ds.vcov.coxphR Documentation

Returns a variance-covariance matrix for a Cox proportional hazards model

Description

This function returns a variance-covariance matrix for a Cox proportional hazards model.

Usage

ds.vcov.coxph(object = NULL, datasources = NULL)

Arguments

object

character string (potentially including * symbol without spaces) specifying the name of the fitted server-side Cox proportioanl hazards model that has been created using ds.coxphSLMAassign()

datasources

a list of DSConnection-class objects obtained after login. If the datasources argument is not specified the default set of connections will be used: see datashield.connections_default. For more information see Details.

Details

This is a function that returns a variance-covariance matrix for a fitted Cox proportional hazards model that has previously been generated on the server side.

Server function called: vcovDS.coxph.

Value

coxphSummaryDS returns to the client-side the variance-covariance matrix of the Cox proportional hazards model

Author(s)

Soumya Banerjee and Tom RP Bishop, 2021

Examples

## 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.coxphSLMAassign(formula = 'surv_object ~  D$female', 
             dataName = 'D', datasources = connections, 
	objectname = 'coxph_serverside')
  
  dsSurvivalClient::ds.vcov.coxph(object = 'coxph_serverside')

  # clear the Datashield R sessions and logout
  datashield.logout(connections)

## End(Not run)


neelsoumya/dsSurvivalClient documentation built on July 1, 2023, 10:32 p.m.