clinical_feature_ols_trend | R Documentation |
Add a clinical feature (variable) to a therapy or encounter longitudinal table. The feature corresponds to the Ordinary Least Squares (OLS) intercept and slope of clinical observations of interest
clinical_feature_ols_trend(
x,
observation_code,
hours,
observation_code_system = NULL,
compute = TRUE
)
## S4 method for signature 'RamsesObject'
clinical_feature_ols_trend(
x,
observation_code,
hours,
observation_code_system = NULL,
compute = TRUE
)
x |
an object of class |
observation_code |
a character vector of clinical investigation codes
matching the |
hours |
the maximum number of hours the observations should date back from
|
observation_code_system |
(optional, reserved to situations where
The default ( |
compute |
if |
The feature will be computed exclusively on numeric investigations
marked with status "final"
, "preliminary"
, "corrected"
,
or "amended"
.
The returned regression slope coefficient corresponds to the mean change associated with a 1-hour time increment.
The returned regression intercept is defined with respect to time equals
zero at t_start
. It thus corresponds to the value of the linear
(straight line) extrapolation of the trend to t_start
.
an object of class TherapyEpisode
or
Encounter
## Not run:
fake_db <- create_mock_database("example.duckdb")
temperature_check <- clinical_feature_ols_trend(
TherapyEpisode(fake_db, "4d611fc8886c23ab047ad5f74e5080d7"),
observation_code = "8310-5",
hours = 24
)
str(longitudinal_table(temperature_check, collect = TRUE))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.