HospiNet: Class providing the HospiNet object with its methods

Description Format Value Methods Public fields Active bindings Methods Examples

Description

Class providing the HospiNet object with its methods

Class providing the HospiNet object with its methods

Format

R6Class object.

Value

Object of R6Class with methods for accessing facility networks.

Methods

new(edgelist, window_threshold, nmoves_threshold, noloops)

This method is used to create an object of this class with edgelist as the necessary information to create the network. The other arguments window_threshold, nmoves_threshold, and noloops are specific to the edgelist and need to be provided. For ease of use, it is preferable to use the function hospinet_from_subject_database

print()

This method prints basic information about the object.

plot(type = "matrix")

This method plots the network matrix by default. The argument type can take the following values:

matrix

plot the network matrix,

clustered_matrix

identify and plot cluster(s) in the matrix using the infomap algorithm (from igraph),

degree

plot the histogram of the number of neighbors by facility,

circular_network

plot the network by clusters using a "spaghetti-like" layout. Only works when there are at least 2 clusters.

Public fields

numFacilities

the number of facilities in the network (read-only). Same as n_facilities, but with a different source (base instead of igraph), maybe useful as double-check

TBAmean

the mean time between admissions (read-only) (not implemented yet)

TBAdistribution

the distribution of time between admissions (read-only) (not implemented yet)

LOSmean

the mean length of stay (read-only) (not implemented yet)

LOSdistribution

the distribution of length of stay (read-only) (not implemented yet)

admissions

the number of admissions in the entire data base (read-only)

subjects

the number of unique subjects in the data base (read-only)

Active bindings

edgelist

(data.table) the list of edges (origin, target) and their associated number of movements (N) (read-only)

edgelist_long

(data.table) edgelist with additionnal informations (read-only)

matrix

(matrix) the transfer matrix (active binding, read-only)

igraph

(igraph) the igraph object corresponding to the network (active binding, read-only)

n_facilities

the number of facilities in the network (read-only)

n_movements

the total number of subject movements in the network (read-only)

window_threshold

the window threshold used to compute the network (read-only)

nmoves_threshold

the nmoves threshold used to compute the network (read-only)

noloops

TRUE if loops have been removed (read-only)

hist_degrees

histogram data of the number of connections per facility

numFacilities

the number of facilities in the network (read-only). Same as n_facilities, but with a different source (base instead of igraph), maybe useful as double-check

TBAmean

the mean time between admissions (read-only) (not implemented yet)

TBAdistribution

the distribution of time between admissions (read-only) (not implemented yet)

LOSmean

the mean length of stay (read-only) (not implemented yet)

LOSdistribution

the distribution of length of stay (read-only) (not implemented yet)

LOSPerHosp

the mean length of stay for each facility (read-only)

admissions

the number of admissions in the entire data base (read-only)

admissionsPerHosp

the number of admissions to each facility (read-only)

subjects

the number of unique subjects in the data base (read-only)

subjectsPerHosp

the number of unique subjects admitted to each facility (read-only)

degrees

number of connections for each facilities (total, in, and out)(read-only)

closenesss

the closeness centrality of each facility (read-only)

betweennesss

the betweenness centrality of each facility (read-only)

cluster_infomap

the assigned community for each facility, based on the infomap algorithm (read-only)

cluster_fast_greedy

the assigned community for each facility, based on the greedy modularity optimization algorithm (read-only)

hubs_global

Kleinberg's hub centrality scores, based on the entire network (read-only)

hubs_infomap

same as hubs_global, but computed per community based on the infomap algorithm (read-only)

hubs_fast_greedy

same as hubs_global, but computed per community based on the infomap algorithm (read-only)

metricsTable

(data.table) all of the above metrics for each facility (read-only)

Methods

Public methods


Method new()

Usage
HospiNet$new(
  edgelist,
  edgelist_long,
  window_threshold,
  nmoves_threshold,
  noloops,
  fsummary = NULL,
  create_MetricsTable = FALSE
)

Method print()

Usage
HospiNet$print()

Method plot()

Usage
HospiNet$plot(type = "matrix", ...)

Method clone()

The objects of this class are cloneable with this method.

Usage
HospiNet$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
mydbsmall = create_fake_subjectDB(n_subjects = 1000, n_facilities = 10)
  
hn = hospinet_from_subject_database(base = mydbsmall,
                                    window_threshold = 10,
                                    count_option = "successive",
                                    condition = "dates")

hn

plot(hn)
plot(hn, type = "clustered_matrix")

PascalCrepey/HospitalNetwork documentation built on Sept. 16, 2020, 9:56 p.m.