networkModel: Run linear mixed models to identify predictors of species'...

Description Usage Arguments Details

View source: R/networkModel.R

Description

Run linear mixed models to identify predictors of species' eigencentralities across sites

Usage

1
networkModel(mods_list, n_bootstraps, n_cores)

Arguments

mods_list

A list of models returned from hurdleModel

n_bootstraps

integer representing the number of bootstrap replicates to perform

n_cores

Positive integer stating the number of processing cores to split the job across. Default is parallel::detect_cores() - 1

Details

Species' network eigencentralities are used as the outcome variable in a linear mixed model to identify environmental and biotic predictors. Only species with mean eigencentrality scores in the top 25th percentile are considered, as these 'keystone' species are the ones that have the strongest influences on community structure. The model pipeline is as follows:
1: shuffle the dataset, impute any missing species' trait values and run a linear mixed model with species and region as random effects (variable intercepts). 2: run a full model with all possible covariates as predictors 3: use stepwise variable selection (using AIC as the loss function) to identify key predictors 4: repeat n_bootstraps times to account for uncertainty in coefficients
Models are then run to identify predictors of site-level interaction B'os using a similar pipeline


nicholasjclark/BBS.occurrences documentation built on July 19, 2020, 8:31 p.m.