This function emulates the xtdescribe function in Stata.
Examples
# Load example longitudinal dataset
data(xt_example)
# Describe the longitudinal structure
xtdescribe(xt_example)
#> patient_id: 1, 2, ..., 10 n = 10
#> year: 2020, 2021, ..., 2024 T = 5
#> Delta (year) = 1 unit
#> Span (year) = 5 periods
#> (patient_id*year uniquely identifies each observation)
#>
#> Distribution of T_i: min 5% 25% 50% 75% 95% max
#> 1 1 2 3 4 5 5
#> Freq. Percent Cum. Pattern
#> 2 20 20 1.1.1
#> 2 20 40 11111
#> 1 10 50 ....1
#> 1 10 60 ...11
#> 1 10 70 .1111
#> 1 10 80 1....
#> 1 10 90 11...
#> 1 10 100 1111.
#> NA <NA> <NA> <NA>
#> 0 0 100.00 (other patterns)
#> 10 100.00 XXXXX