View source: R/EstimateInHospitalMortality.R
Estimates the proportion of patients who died in hospital with a bootstrap confidence interval if requested.
1 2 3 4 5 6 | EstimateInHospitalMortality(study.sample, variable.name = "m24h",
died.level = "Yes", digits = 3,
bootstrap.confidence.interval = TRUE,
bootstrap.samples.exist = FALSE, random.seed.already.set = FALSE,
random.seed = NULL, number.of.bootstrap.samples = 1000,
save.to.results = TRUE, print.result = TRUE, return.result = FALSE)
|
study.sample |
Data frame. The study sample. No default. |
variable.name |
Character vector of length 1. The name of the in hospital mortality variable. Defaults to "m24h". |
died.level |
Character vector of length 1. The level of the in hospital mortality variable that indicates in hospital mortality. Defaults to "Yes". |
digits |
Numeric vector of length 1. Must be a positive integer. The number of digits to use when rounding the proportion, and if applicable, the lower and upper bounds of the confidence interval. Defaults to 3. |
bootstrap.confidence.interval |
Logical vector of length 1. If TRUE a confidence interval is estimated using an emperical bootstrap. Deafults to TRUE. |
bootstrap.samples.exist |
Logical vector of length 1. If TRUE bootstrap samples are assumed to have been created using CreateBootstrapSamples, and are therefore read from the file bootstrap.samples.Rds. Defaults to FALSE. |
random.seed.already.set |
Logical vector of length 1. If TRUE random.seed does not need to be set within this function as it indicates that this has been done (which is good practice) earlier in the code. Defaults to FALSE. |
random.seed |
Numeric vector of length 1. Has to be an integer. The seed to use for random number generation. Only used if bootstrap.conficence.interval is TRUE and random.seed.already.set is FALSE. Defaults to NULL. |
number.of.bootstrap.samples |
Numeric vector of length 1. Has to be a positive integer. The number of bootstrap samples to use. Only used it bootstrap.confidence.interval is TRUE. Defaults to 1000. |
save.to.results |
Logical vector of length 1. If TRUE the table object is saved to a results file on disk using SaveToResults. Defaults to TRUE. |
print.result |
Logical vector of length 1. If TRUE the result is printed so that you see what is saved to results. Defaults to TRUE. |
return.result |
Logical vector of length 1. If TRUE the result is returned to the parent environment. Default to FALSE. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.