medication_frequency {tame} | R Documentation |
ATC Code Frequency Within Clusters
Description
The function medications()
calculates the frequency of the different
unique ATC codes within each cluster.
Usage
medication_frequency(
object,
only = NULL,
clusters = NULL,
additional_data = NULL,
...
)
Arguments
object |
An object for which a summary is desired. |
only |
< The default |
clusters |
< The default |
additional_data |
A data frame with additional data that may be
(left-)joined onto the |
... |
Additional arguments passed to the specific summary sub-function. |
Details
medication_frequency()
calculates the number of individuals with a specific
ATC code within a cluster. Moreover, it calculates the percentage of people
with this medication assigned to this cluster and the percent of people
within the cluster with this medication.
Value
medication_frequency()
returns a data frame with class
medication_frequency
.
-
Clustering
the name of the clustering. -
Cluster
the cluster name. -
atc ATC codes.
-
Count
number of individuals with this ATC code in this cluster. -
Percent of All Medication
the percentage of individuals in the study with this ATC code and cluster. -
Percent of Medication in Cluster
the percent of individuals in the cluster with this ATC code.
Examples
clust <- medic(complications, id = id, atc = atc, k = 3:5)
medication_frequency(clust, k == 5, clusters = I:III)