netGAM.network: Name: netGAM.network

View source: R/NetGAM_Func.R

netGAM.networkR Documentation

Name: netGAM.network

Description

Description: Takes a GAM-transformed species abundance dataframe as input (output of netGAM.df function), runs a network analysis on the gamm residuals, and returns an adjacency matrix of network-predicted associations.

Usage

netGAM.network(gam_df, method = "glasso", pvalue = NULL)

Arguments

gam_df

GAM-transformed species abundance dataframe with samples as rows species as columns (i.e. output of netGAM.df function)

method

Networking method to use (default is glasso). "glasso" = graphical lasso network constructed with the "batch.pulsar" function in the pulsar package with StARS selection; "scc" = spearman correlation network constructed with the "corr.test" function in the psych package; "pcc" = pearson correlation network constructed with the "corr.test" function in the psych package.

pvalue

P-value cutoff for deciding whether or not an edge exists (default is NULL). P-values in corrleation networks are bonferroni-adjusted prior to declaring cutoff. P-value only needed for scc and pcc networks.

Value

Adjacency matrix of network predicitons (1 = edge, 0 = no edge) for glasso networks and an edgelist with p-values for correlation networks


sgleich/NetGAM documentation built on Feb. 15, 2024, 1:13 a.m.