print.bayescomm: Print a bayescomm object

Description Usage Arguments See Also Examples

Description

print.bayescomm prints a brief summary of a bayescomm object.

Usage

1
2
## S3 method for class 'bayescomm'
print(x, ...)

Arguments

x

a bayescomm object

...

further arguments to pass to print

See Also

BC

Examples

1
2
3
m1 <- example(BC)[[1]]
print(m1)
m1

Example output

BC> # create fake data
BC> n <- 100

BC> nsp <- 4

BC> k <- 3

BC> X <- matrix(c(rep(1, n), rnorm(n * k)), n)  # covariate matrix

BC> W <- matrix(rnorm(nsp * nsp), nsp)

BC> W <- W %*% t(W) / 2  # true covariance matrix

BC> B <- matrix(rnorm(nsp * (k + 1), 0, 3), nsp)  # true covariates

BC> mu <- apply(B, 1, function(b, x) x %*% b, X)  # true mean

BC> e <- matrix(rnorm(n * nsp), n) %*% chol(W)  # true e

BC> z <- mu + e  # true z

BC> Y <- ifelse(z > 0, 1, 0)  # true presence/absence

BC> # run BC (after removing intercept column from design matrix)
BC> m1 <- BC(Y, X[, -1], model = "full", its = 100)
model type:   full
observations:   100
species:   sp1 sp2 sp3 sp4
covariates:   intercept cov1 cov2 cov3
iterations:  100 	thin:  1 	discarded:  0model type:   full
observations:   100
species:   sp1 sp2 sp3 sp4
covariates:   intercept cov1 cov2 cov3
iterations:  100 	thin:  1 	discarded:  0

BayesComm documentation built on May 2, 2019, 1:43 p.m.