pps: Get list of paths between two nodes and their PPS

Description Usage Arguments Value

View source: R/pps.R

Description

For a given precision matrix or partial correlation matrix and a given pair of nodes, computes all paths between those nodes up to a certain length and their PPS

Usage

1
pps(P, i, j, K = 5, prec = TRUE, use.names = TRUE)

Arguments

P

A precision matrix or partial correlation matrix.

i, j

Node numbers. Should be positive integers.

K

The maximum path length to search up to. Defaults to 5.

prec

If TRUE, indicates that P is a precision matrix. If FALSE, P is taken to be a partial correlation matrix. Defaults to TRUE.

use.names

Whether or not to ouput paths using node names. Defaults to TRUE. If the precision/partial correlation matrix does not have column names, indices will be used.

Value

A list with the following elements:

path

A list of paths between nodes i and j in order of descending PPS.

pps

A list of the PPS values for the paths in path.

gamma

The individual contributions of each path in path on the correlation scale.


nathan-gill/pps documentation built on Dec. 21, 2021, 11:12 p.m.