How one from -> to transition behaves across lags, as a tidy
one-row-per-lag data frame. A clean shortcut for "track this
transition over lags 1, 2, 3, ...".
Arguments
- x
Sequence input (any form accepted by
lsa()) or an existinglsa_lags()object.- from, to
State labels of the transition to profile.
- lags
Integer vector of lags. Default
1:3. Ignored whenxis already anlsa_lagsobject.- ...
Passed to
lsa_lags()whenxis raw data.
Value
A tidy data.frame, one row per lag, with columns lag,
from, to, count, prob, adj_res, p, and significant.
Examples
lag_profile(group_regulation, "plan", "consensus", lags = 1:3)
#> lag from to count prob adj_res p significant
#> 1 1 plan consensus 1788 0.2904012 8.526657 1.506377e-17 TRUE
#> 2 2 plan consensus 1316 0.2323036 -3.619001 2.957420e-04 TRUE
#> 3 3 plan consensus 1261 0.2433893 -1.135550 2.561448e-01 FALSE