make_mbm: Construct (but do not fit) an mbm model

Description Usage Arguments Value

View source: R/make_mbm.r

Description

Construct (but do not fit) an mbm model

Usage

1
2
3
make_mbm(y, x, y_name, link, likelihood, lengthscale, sparse,
  force_increasing, sparse_inducing = 10, sparse_batch = 10,
  sparse_iter = 10000)

Arguments

y

Square dissimilarity or distance matrix, can be complete or lower triangular only. Row and column names are required and must match the site names in the rows of x.

x

Matrix giving a series of covariates (in columns) for all sites (in rows). Row names are required. All variables will be included in the model.

y_name

A name to give to the y variable

link

Link function to use

likelihood

Likelihood function to use

lengthscale

Either missing (in which case all lengthscales will be optimized) or a numeric vector of length ncol(x)+1. If a vector, the first entry corresponds to environmental distance, and entries i = 1 + (1:n) correspond to the variable in x[,i]. Values must be NA or positive numbers; if NA, the corresponding lengthscale will be set via optimization, otherwise it will be fixed to the value given.

sparse

Should we use the stochastic variational GP.

force_increasing

Boolean; if true, beta diversity will be constrained to increase with environmental distance

sparse_inducing

Number of inducing inputs to use for the svgp

sparse_batch

Batchsize to use for the svgp

sparse_iter

Maximum number of optimizer iterations for svgp

Value

An mbm object


mtalluto/mbmtools documentation built on Aug. 13, 2019, 9:44 a.m.