View source: R/class_summary.R
summary.sars | R Documentation |
S3 method for class 'sars'. summary.sars
creates
summary statistics for objects of class 'sars'. The exact summary
statistics computed depends on the 'Type' attribute (e.g. 'multi') of
the 'sars' object. The summary method generates more useful information
for the user than the standard model fitting functions. Another S3
method (print.summary.sars
; not documented) is used to print the
output.
## S3 method for class 'sars'
summary(object, ...)
object |
An object of class 'sars'. |
... |
Further arguments. |
The summary.sars
function returns an object of class
"summary.sars". A print function is used to obtain and print a summary
of the model fit results.
For a 'sars' object of Type 'fit', a list with 16 elements is returned that contains useful information from the model fit, including the model parameter table (with t-values, p-values and confidence intervals), model fit statistics (e.g. R2, AIC), the observed shape of the model and whether or not the fit is asymptotic, and the results of any additional model checks undertaken (e.g. normality of the residuals).
For a 'sars' object of Type 'multi', a list with 5 elements is returned:
(i) a vector of the names of the models that were successfully fitted and
passed any additional checks, (ii) a character string containing the name
of the criterion used to rank models, (iii) a data frame of the ranked
models, (iv) a vector of the names of any models that were not fitted or
did not pass any additional checks, and (v) a logical vector specifying
whether the optim
convergence code for each model that passed
all the checks is zero. In regards to (iii; Model_table
), the
dataframe contains the fit summaries for each successfully fitted model
(including the value of the model criterion used to compare models, the R2
and adjusted R2, and the observed shape of the fit); the models are ranked
in decreasing order of information criterion weight.
For a 'sars' object of Type 'lin_pow', a list with up to 7 elements is
returned: (i) the model fit output from the lm
function, (ii)
the fitted values of the model, (iii) the observed data, (iv and v) the
results of the residuals normality and heterogeneity tests, and (vi) the
log-transformation function used. If the argument compare = TRUE
is
used in lin_pow
, a 7th element is returned that contains the
parameter values from the non-linear power model.
For a 'sars' object of Type 'threshold', a list with three elements is
returned: (i) the information criterion used to order the ranked model
summary table (currently just BIC), (ii) a model summary table (models are
ranked using BIC), and (iii) details of any axes log-transformations
undertaken. Note that in the model summary table, if log-area is used as
the predictor, the threshold values will be on the log scale used. Thus it
may be preferable to back-transform them (e.g. using exp(th)
if
natural logarithms are used) so that they are on the scale of untransformed
area. Th1 and Th2 in the table are the threshold value(s), and seg1, seg2,
seg3 provide the number of datapoints within each segment (for the
threshold models); one-threshold models have two segements, and
two-threshold models have three segments.
For a 'sars' object of Type 'habitat', a list with two elements is
returned: (i) a model summary table (models are ranked using AICc), and
(ii) the value of the modType
argument used in the
sar_habitat
function call.
data(galap)
#fit a multimodel SAR and get the model table
mf <- sar_average(data = galap, grid_start = "none")
summary(mf)
summary(mf)$Model_table
#Get a summary of the fit of the linear power model
fit <- lin_pow(galap, con = 1, compare = TRUE)
summary(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.