BCfit
is the workhorse function for the BayesComm model.
It is highly recommended to use the wrapper function BC
which checks inputs and sets up different model types and initial values.
BCfit
arguments can be accessed through BC
using the ...
argument.
BCfit(y, X, covlist, R, z, mu, updateR, iters, thin = 1, burn = 0,
priW = c(nrow(z) + 2 * ncol(z), 2 * ncol(z)), verbose = 0)
R
0
for no updates. 1
for
updates every thin
iterations after burnin. 2
for updates every iteration.
priW
specifies the inverse Wishart prior on the unknown and unidentifiable covariance matrix W from which the correlation matrix R is derived.
priW
is a vector of length two, the first element specifies the degrees of freedom, the second element is multiplied by an identity matrix to form the scale matrix.
The default for priW
is c(n + 2p, 2p), where n is the number of records and p is the number of species in the community; this therefore forms the prior: iW(n + 2p, 2pI).
This prior was determined to exert minimal influence on the posterior of R whilst limiting dependence of R on the unidentifiable variance parameters of W.For further details on how to specify Y
, X
and covlist
see BC
.
BC