SPAS.print.model: Print or Extract the results from a fit of a...

View source: R/SPAS.print.model.R

SPAS.print.modelR Documentation

Print or Extract the results from a fit of a Stratified-Petersen (SP) model when using the TMB optimizer

Description

This function makes a report/extracts the components of the results of the model fitting .

Usage

SPAS.print.model(x, extract = FALSE)

Arguments

x

A result from the model fitting. See SPAS.fit.model

extract

Should the function simply return the "printed" components in a list?.

Value

A report to the console or extracted components. Refer to the vignettes.

Examples

conne.data.csv <- textConnection("
9  ,    21  ,     0  ,    0  ,    0  ,    0  ,   171
0  ,   101  ,    22  ,    1  ,    0  ,    0  ,   763
0  ,     0  ,   128  ,   49  ,    0  ,    0  ,   934
0  ,     0  ,     0  ,   48  ,   12  ,    0  ,   434
0  ,     0  ,     0  ,    0  ,    7  ,    0  ,    49
0  ,     0  ,     0  ,    0  ,    0  ,    0  ,     4
351,  2736  ,  3847  , 1818  ,  543  ,   191 ,     0")
conne.data <- as.matrix(read.csv(conne.data.csv, header=FALSE))
close(conne.data.csv)
 
mod1 <- SPAS.fit.model(conne.data, model.id="Pooling rows 1/2, 5/6; pooling columns 5/6",
                      row.pool.in=c("12","12","3","4","56","56"),
                      col.pool.in=c(1,2,3,4,56,56))

SPAS.print.model(mod1)

out <- SPAS.print.model(mod1, extract=TRUE)
names(out)
out$spas

SPAS documentation built on April 12, 2025, 2:24 a.m.