% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SPAS.print.model.R
\name{SPAS.print.model}
\alias{SPAS.print.model}
\title{Print or Extract the results from a fit of a Stratified-Petersen (SP) model when using the TMB optimizer}
\usage{
SPAS.print.model(x, extract = FALSE)
}
\arguments{
\item{x}{A result from the model fitting. See \code{SPAS.fit.model}}

\item{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.
}
\description{
This function makes a report/extracts the components of the results of the model fitting
.
}
\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
}
