PROCRUSTESnet: PROCRUSTESnet

View source: R/MDSnet.R

PROCRUSTESnetR Documentation

PROCRUSTESnet

Description

Convenience function for simultaneously plotting two networks containing the same nodes.

Usage

PROCRUSTESnet(
  qgraph_net1,
  qgraph_net2,
  type1 = c("ordinal", "interval", "ratio", "mspline"),
  type2 = type1,
  MDSadj1 = NULL,
  MDSadj2 = NULL,
  stressTxt = F,
  congCoef = F,
  repulse = F,
  repulsion = 1,
  mdsArgs = list(),
  ...
)

Arguments

qgraph_net1

an object of type qgraph

qgraph_net2

an object of type qgraph. Contains the same nodes as qgraph_net2

type1

transformation function for first MDS, defaults to "ordinal"

type2

transformation function for second MDS, defaults to the same as type1

MDSadj1

to use a proximities matrix other than the adjacency matrix stored in qgraph_net1, provide it in this argument

MDSadj2

to use a proximities matrix other than the adjacency matrix stored in qgraph_net2, provide it in this argument

stressTxt

logical. Print the stress value in the lower left corner of the plots?

congCoef

logical. Print the congruence coefficient for the two layouts?

repulse

logical. Add a small repulsion force with wordcloud package to avoid node overlap?

repulsion

scalar for the repulsion force. Larger values add more repulsion

mdsArgs

additional arguments in list format passed to smacof::mds

...

additional arguments passed to qgraph

Details

Each network's layout is determined by multidimensional scaling, and then the layouts are brought into a similar space by using the Procrustes algorithm.

A network plotted with multidimensional scaling can be interpreted based on the distances between nodes. Nodes close together represent closely associated nodes, whereas nodes that are far apart represent unassociated or negatively associated nodes.

The Procrustes algorithm brings the two layouts into a similar space through rotations and dilations that do not impact the fit of the MDS solutions. In this implementation, the second network is rotated and dilated to fit the first.

References

Jones, P. J., Mair, P., & McNally, R. J. (2018). Visualizing psychological networks: A tutorial in R. Frontiers in Psychology, 9, 1742. https://doi.org/10.3389/fpsyg.2018.01742


networktools documentation built on May 29, 2024, 11:47 a.m.