timing_trajectory {tame} | R Documentation |
Timing pattern frequency within clusters
Description
timing_trajectory()
calculates the average timing paths within clusters.
Usage
timing_trajectory(
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
timing_trajectory()
calculates both the number of unique timing
trajectories in each cluster and the average timing trajectories in each
cluster.
Value
timing_trajectory()
returns a list of class timing_trajectory
with two
data frames:
average
-
Clustering
the name of the clustering. -
Cluster
the cluster name. -
timing variables the average timing value in the cluster.
-
Count
the number of people in the cluster.
individual
-
Clustering
the name of the clustering. -
Cluster
the cluster name. -
timing variables unique timing pattern in the cluster.
-
Count
number of people with this unique timing pattern.
Examples
clust <- medic(
complications,
id = id,
atc = atc,
k = 3:5,
timing = first_trimester:third_trimester
)
timing_trajectory(clust, k == 5, clusters = I:III)