Skip to contents

Compute Sequence Indices for Sequence Data

Usage

sequence_indices(data, cols = tidyselect::everything(), favorable, omega = 1)

Arguments

data

[data.frame]
Sequence data in wide format (rows are sequences, columns are time points). The input should be coercible to a data.frame object.

cols

[tidy-select]
A tidy selection of columns that should be considered as sequence data. By default, all columns are used.

favorable

[character()]
Names of states that should be considered favorable.

omega

[numeric(1): 1.0]
Omega parameter value used to compute the integrative potential.

Value

A tibble containing the index values.

Examples

sequence_indices(engagement)
#> # A tibble: 1,000 × 23
#>    valid_n valid_proportion unique_states mean_spell_duration max_spell_duration
#>      <int>            <dbl>         <int>               <dbl>              <dbl>
#>  1      23                1             3                3.83                 11
#>  2      23                1             3                3.29                 11
#>  3      24                1             3                3.43                  8
#>  4      24                1             3                4                     9
#>  5      24                1             3                3.43                 12
#>  6      23                1             3                5.75                 13
#>  7      23                1             3                2.88                  7
#>  8      23                1             3                3.29                  8
#>  9      23                1             3                2.88                  7
#> 10      24                1             3                8                    20
#> # ℹ 990 more rows
#> # ℹ 18 more variables: longitudinal_entropy <dbl>, simpson_diversity <dbl>,
#> #   self_loop_tendency <dbl>, transition_rate <dbl>,
#> #   transition_complexity <dbl>, initial_state_persistence <dbl>,
#> #   initial_state_proportion <dbl>, initial_state_influence_decay <dbl>,
#> #   cyclic_feedback_strength <dbl>, first_state <chr>, last_state <chr>,
#> #   dominant_state <chr>, dominant_proportion <dbl>, …