Type: | Package |
Title: | ICU Length of Stay Prediction and Efficiency Evaluation |
Version: | 1.0.1 |
Maintainer: | Joana da Matta <joana.damatta02@gmail.com> |
Description: | Provides tools for predicting ICU length of stay and assessing ICU efficiency. It is based on the methodologies proposed by Peres et al. (2022, 2023), which utilize data-driven approaches for modeling and validation, offering insights into ICU performance and patient outcomes. References: Peres et al. (2022)https://pubmed.ncbi.nlm.nih.gov/35988701/, Peres et al. (2023)https://pubmed.ncbi.nlm.nih.gov/37922007/. More information: https://github.com/igor-peres/ICU-Length-of-Stay-Prediction. |
License: | MIT + file LICENSE |
Encoding: | UTF-8 |
Imports: | httr, MLmetrics, ems, dplyr, ggplot2, magrittr, caretEnsemble, ranger |
Suggests: | testthat |
RoxygenNote: | 7.3.2 |
NeedsCompilation: | no |
Packaged: | 2025-02-06 13:46:47 UTC; jodamatta |
Depends: | R (≥ 3.5.0) |
Author: | Igor Peres [aut], Joana da Matta [cre] |
Repository: | CRAN |
Date/Publication: | 2025-02-06 14:10:02 UTC |
SLOS function
Description
This function is the core of the SLOS package. It generates the prediction for each unit, a funnel plot for the SLOS analysis and a plot comparing observed vs predicted SLOS. To access the funnel plot, run ems::plot(result$funnel_plot).
Usage
SLOS(data)
Arguments
data |
Data frame or matrix containing testing data |
Value
Displays the funnel plot, returns the comparing plot as a ggplot object and the SLOS table.
Examples
# Load example data
data(SampledData)
# Call the SLOS function on your data
result <- SLOS(sampled_data)
# Access the comparison plot
result$plot_SLOS_obv_prev
# Access the predictions for each unit
result$df_unit_slos
# The funnel plot will be displayed automatically, and you can access it again by calling
plot(result$funnel_plot)
Load the SLOS model
Description
This function loads the pre-trained model from the package.It's available on GitHub
Usage
load_SLOSModel()
Value
The SLOS model
Predict using the SLOS model
Description
This function makes predictions using the pre-trained SLOS model and evaluates it based on RMSE, MAE, and R2 values.
Usage
predict_and_evaluate(data)
Arguments
data |
A data frame or matrix of new data for prediction. |
Value
A list containing the predictions made on the input data, a data frame combining the observed values and predictions side by side, and the RMSE, MAE, and R2.
Examples
# Load example data
data(SampledData)
# Make predictions and evaluate
results <- predict_and_evaluate(sampled_data)
# View results
print(results$RMSE)
print(results$MAE)
print(results$R2)
Sampled Data
Description
An anonymized dataset with 1000 entries used for testing the SLOS prediction model.
Usage
data(SampledData)
Format
An object of class "data.frame"