create_fake_subjectDB_clustered: Create a fake subject database with clustering
Description
Create a fake subject database with clustering
Usage
create_fake_subjectDB_clustered(
n_subjects = 50,
n_facilities = 10,
avg_n_stays = 3,
days_since_discharge = NULL,
length_of_stay = NULL,
n_clusters = 3
)
Value
a data.table containing all subjects stays
Arguments
- n_subjects
the number of different subjects in the database
- n_facilities
the number of facility present in the database
- avg_n_stays
the average number of stays per subject
- days_since_discharge
the number of days between a discharge date and an admission date (default: max(0, rnorm(1, mean = 30, sd = 10)))
- length_of_stay
the length of stay (default: max(1, rnorm(1, mean = 5, sd = 3) )
- n_clusters
the number of cluster in the network
Examples
Run this codemydb <- create_fake_subjectDB_clustered(n_subjects = 100, n_facilities = 10)
mydb
Run the code above in your browser using DataLab