Skip to contents

Converts the estimated 0/1 adjacency matrix into a long-format data.frame with one edge per row, like tidy.LingamResult(). Because RESIT is a nonlinear method, estimate is always 1 (an edge indicator, not a coefficient).

Usage

# S3 method for class 'ResitResult'
tidy(x, threshold = 0, ...)

Arguments

x

The return value of lingam_resit() (a ResitResult object)

threshold

Kept for interface consistency with the other tidy() methods (default: 0); with 0/1 entries any value in [0, 1) returns all edges

...

Unused

Value

data.frame(from, to, estimate)

Examples

# \donttest{
if (requireNamespace("mgcv", quietly = TRUE)) {
  nonlinear <- generate_resit_sample(n = 300, seed = 1)
  model <- lingam_resit(nonlinear$data)
  tidy(model)
}
#>   from to estimate
#> 1   x0 x1        1
#> 2   x0 x2        1
#> 3   x1 x2        1
#> 4   x2 x3        1
# }