summary.medic {tame} | R Documentation |
Summary of medic object
Description
Make cluster characterizing summaries.
Usage
## S3 method for class 'medic'
summary(
object,
only = NULL,
clusters = NULL,
outputs = c("frequencies", "medications", "amounts", "trajectories", "interactions"),
additional_data = NULL,
...
)
## S3 method for class 'summary.medic'
print(x, ...)
## S3 method for class 'summary.medic'
plot(x, by, facet, ...)
Arguments
object |
An object for which a summary is desired. |
only |
< The default |
clusters |
< The default |
outputs |
A character vector naming the desired characteristics to output. The default names all possible output types. |
additional_data |
A data frame with additional data that may be
(left-)joined onto the |
... |
Additional arguments passed to the internal summary function.
|
x |
A |
by |
|
facet |
Value
A list of clustering characteristics of class summary.medic
is returned. It
can contain any of the following characteristics:
Frequencies
The number of individuals assigned to each cluster and the associated frequency of assignment.
Medications
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.
Amounts
The number of ATC codes an individual has, and then outputs the number of individuals within a cluster that has that many ATC codes. Moreover, various relevant percentages or calculated. See Value below for more details on these percentages.
Trajectories
The number of unique timing trajectories in each cluster, and the average timing trajectories in each cluster.
Interactions
The number of people with unique timing trajectory and ATC group, as given by
atc_groups
, in each cluster.
Methods (by generic)
-
print(summary.medic)
: Print method for medic-objects -
plot(summary.medic)
: Plot method for medic-objects
Examples
clust <- medic(complications, id = id, atc = atc, k = 3:5)