Title: | ICU Length of Stay Prediction and Efficiency Evaluation |
---|---|
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>. |
Authors: | Igor Peres [aut], Joana da Matta [cre] |
Maintainer: | Joana da Matta <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.0.1 |
Built: | 2025-03-08 05:48:18 UTC |
Source: | https://github.com/cran/SLOS |
This function loads the pre-trained model from the package.It's available on GitHub
load_SLOSModel()
load_SLOSModel()
The SLOS model
This function makes predictions using the pre-trained SLOS model and evaluates it based on RMSE, MAE, and R2 values.
predict_and_evaluate(data)
predict_and_evaluate(data)
data |
A data frame or matrix of new data for prediction. |
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.
# 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)
# 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)
An anonymized dataset with 1000 entries used for testing the SLOS prediction model.
data(SampledData)
data(SampledData)
An object of class "data.frame"
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).
SLOS(data)
SLOS(data)
data |
Data frame or matrix containing testing data |
Displays the funnel plot, returns the comparing plot as a ggplot object and the SLOS table.
# 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 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)