powered by
Create a fake subject database
create_fake_subjectDB( n_subjects = 100, n_facilities = 10, avg_n_stays = 3, days_since_discharge = NULL, length_of_stay = NULL, start_id_subjects = 1, start_id_facilities = 1, with_errors = FALSE )
a data.table containing all subjects stays
the number of different subjects in the database
the number of facility present in the database
the average number of stays per subject
the number of days between a discharge date and an admission date (default: max(0, rnorm(1, mean = 30, sd = 10)))
the length of stay (default: max(1, rnorm(1, mean = 5, sd = 3) )
change starting ids (used for clustered network)
(boolean) introduce or not random errors in the database. Default to FALSE.
mydb <- create_fake_subjectDB(n_subjects = 100, n_facilities = 10) mydb
Run the code above in your browser using DataLab