Skip to contents

Compares two transition_effects() tables on the transitions they share: the same contrast from two bootstrap seeds, or one covariate coded two ways (e.g. continuous and in groups).

Usage

effects_agreement(a, b)

# S3 method for class 'net_effects_agreement'
print(x, digits = 2L, ...)

Arguments

a, b

Two net_transition_effects tables. Two tables of one contrast each are compared directly, also when their terms differ (one covariate coded two ways); otherwise each contrast of a is compared with the same term and values in b, one row per contrast, with term, reference and comparison first.

x

For the print() method: the result of effects_agreement().

digits

For the print() method: decimals shown. Default 2.

...

Ignored.

Value

A data frame with one row per compared contrast: compared (transitions in both), correlation of the differences, same_sign (share of differences with the same sign), excludes_zero_a, excludes_zero_b, excludes_zero_both, opposite (transitions whose intervals exclude zero in both with opposite signs), same_verdict (share with the same verdict on whether the interval excludes zero), and max_limit_diff, mean_limit_diff (largest and mean absolute difference of the interval limits), of class net_effects_agreement. print() shows one line per measure and one column per contrast, to digits decimals.

Examples

net <- build_ftna(group_regulation_long, action = "Action", actor = "Actor",
                  time = "Time")
fit <- transition_regression(net, covariates = "Achiever", actor = "Group")
set.seed(1)
a <- transition_effects(fit, term = "Achiever", values = c("Low", "High"), iter = 20)
set.seed(2)
b <- transition_effects(fit, term = "Achiever", values = c("Low", "High"), iter = 20)
effects_agreement(a, b)
#> Agreement of two transition effects tables
#> 
#>  measure                        a against b
#>  transitions compared           46         
#>  correlation of the differences 1.00       
#>  share with the same sign       1.00       
#>  intervals excluding zero in a  26         
#>  intervals excluding zero in b  26         
#>  excluding zero in both         25         
#>  of those, opposite signs       0          
#>  share with the same verdict    0.96       
#>  largest change of a limit      0.02       
#>  mean change of a limit         0.01