Learn R Programming

NetworkToolbox (version 0.0.1.0)

MaST: Maximum Spanning Tree

Description

Applies the Maximum Spanning Tree (MaST) filtering method

Usage

MaST(data, binary = FALSE, weighted = TRUE)

Arguments

data

Can be a dataset or a correlation matrix

binary

Is dataset dichotomous? Defaults to FALSE. Set TRUE if dataset is dichotomous (tetrachoric correlations are computed)

weighted

Should network be weighted? Defaults to TRUE. Set FALSE to produce an unweighted (binary) network

Value

A sparse association matrix

References

Adapted from: <https://www.mathworks.com/matlabcentral/fileexchange/23276-maximum-weight-spanning-tree--undirected>

Examples

Run this code
# NOT RUN {
weighted_MaSTnetwork<-MaST(data)

weighted_binary_MaSTnetwork<-MaST(data,binary=TRUE)

unweighted_MaSTnetwork<-MaST(data,weighted=FALSE)

unweighted_binary_MaSTnetwork<-MaST(data,binary=TRUE,weighted=FALSE)
# }

Run the code above in your browser using DataLab