print.species_mix: Print a species_mix model object.

print.species_mixR Documentation

Print a species_mix model object.

Description

Print a species_mix model object.

Usage

## S3 method for class 'species_mix'
print(x, ...)

Arguments

x

A model object.

\dots

Ignored

Examples


#Print information about a species_mix model

library(ecomix)
set.seed(42)
sam_form <- stats::as.formula(paste0('cbind(',paste(paste0('spp',1:20),
collapse = ','),")~x1+x2"))
sp_form <- ~ 1
beta <- matrix(c(-2.9,-3.6,-0.9,1,.9,1.9),3,2,byrow=TRUE)
dat <- data.frame(y=rep(1,100),x1=stats::runif(100,0,2.5),
x2=stats::rnorm(100,0,2.5))
dat[,-1] <- scale(dat[,-1])
simulated_data <- species_mix.simulate(archetype_formula = sam_form,species_formula = sp_form,
data = dat,beta=beta,family="bernoulli")
fm1 <- species_mix(archetype_formula = sam_form,species_formula = sp_form,
data = simulated_data, family = 'bernoulli',  nArchetypes=3)
print(fm1)

skiptoniam/ecomix documentation built on Sept. 14, 2023, 6:04 a.m.