timing_atc_group | R Documentation |
The function timing_atc_group()
calculates the frequencies of distinct
timing and ATC combinations within clusters.
timing_atc_group(
object,
only = NULL,
clusters = NULL,
atc_groups = default_atc_groups,
additional_data = NULL,
...
)
object |
An object for which a summary is desired. |
only |
< The default |
clusters |
< The default |
atc_groups |
A data.frame specifying the ATC groups to summaries by or a funciton that returns such a data.frame. The data.frame must have two columns:
As a standard the anatomical level (first level) of the ATC codes is used. |
additional_data |
A data frame with additional data that may be
(left-)joined onto the |
... |
Additional arguments passed to the specific summary sub-function. |
timing_atc_group()
calculates both the number of people with unique timing
trajectory and ATC group, as given by atc_groups
, in each cluster.
timing_atc_group()
returns a list of class
timing_atc_group
with two data frames:
Clustering
the name of the clustering.
Cluster
the name of the cluster.
ATC Groups
the name of the ATC group. The groups are given by the
atc_groups
input.
timing variables the average timing value in the ATC group and cluster.
Number of Medications
the number of medications in the ATC group in
the cluster.
Percentage of Medications
the percentage of medication in the cluster
with this ATC group.
Number of Distinct Timing Trajectories
the number of unique timing
trajectories in the ATC group in the cluster.
Clustering
the name of the clustering.
Cluster
the name of the cluster.
timing variables a unique timing pattern in the ATC group and cluster.
Number of Medications with Timing Trajectory
the number of medications
with this unique timing trajectory and ATC group.
clust <- medic(
complications,
id = id,
atc = atc,
k = 3:5,
timing = first_trimester:third_trimester
)
timing_atc_group(clust, k == 5, clusters = I:III)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.