项目作者: amices

项目描述 :
Multivariate Imputation by Chained Equations for DataSHIELD - Server
高级语言: R
项目地址: git://github.com/amices/dsMice.git
创建时间: 2018-11-30T15:25:24Z
项目社区:https://github.com/amices/dsMice

开源协议:

下载


dsMice

Multivariate Imputation by Chained Equations for DataSHIELD - Server

The mice package creates multiple imputations (replacement values) for multivariate missing data.

The DataSHIELD framework is a platform for federated data analysis that brings the algorithm to the data.

The dsMiceClient package is an add-on to mice that makes multiple imputation available for federated data systems. This is the package that the DataSHIELD end user installs locally.

The dsMice package is part of the DataSHIELD infrastructure. This is the package that the DataSHIELD node owner installs on the server.

Installation

The following code installs the dsMice package on the node server:

Install the opaladmin dependence using the R console.

  1. install.packages('opaladmin', repos=c('http://cran.rstudio.com/', 'http://cran.obiba.org'), dependencies=TRUE)

Call the opal and opaladmin library.

  1. library(opal)
  2. library(opaladmin)

Connect to data nodes.

  1. o <- opal.login(username = 'user', password = 'pass', url = "https://node-address-1")
  2. o2 <- opal.login(username = 'user', password = 'pass', url = "https://node-address-2")
  3. o3 <- opal.login(username = 'user', password = 'pass', url = 'https://node-address-3')

Remove old version of the package (if you have installed it before).

  1. if ("dsMice" %in% rownames(installed.packages())) dsadmin.remove_package(o, 'dsMice')
  2. if ("dsMice" %in% rownames(installed.packages())) dsadmin.remove_package(o2, 'dsMice')
  3. if ("dsMice" %in% rownames(installed.packages())) dsadmin.remove_package(o3, 'dsMice')

Install the package devtools into data node (only for the first run).

  1. oadmin.install_devtools(o)
  2. oadmin.install_devtools(o2)
  3. oadmin.install_devtools(o3)

Download the package from Git repository to data nodes.

  1. cmd <- paste('devtools::install_github("stefvanbuuren/dsMice")')
  2. opal.execute(o, cmd)
  3. opal.execute(o2, cmd)
  4. opal.execute(o3, cmd)

Install the package into data nodes

  1. dsadmin.install_package(o, 'dsMice')
  2. dsadmin.install_package(o2, 'dsMice')
  3. dsadmin.install_package(o3, 'dsMice')

Publish the package’s DataSHIELD methods

  1. dsadmin.set_package_methods(o, 'dsMice')
  2. dsadmin.set_package_methods(o2, 'dsMice')
  3. dsadmin.set_package_methods(o3, 'dsMice')

Logout from Opal

  1. opal.logout(o)
  2. opal.logout(o2)
  3. opal.logout(o3)

In order to work well, the end user should that the dsMiceClient package installed locally.

Note

Warning: This is an experimental feature. These function do not yet actually work. If you have ideas about the integration of mice and DataSHIELD feel free to join in.

Related work appears in gflcampos/dsMice and gflcampos/dsMiceClient.

Minimal example

Include minimal example here using public DataSHIELD nodes.