| totals | R Documentation |
Extract time-totals from TRIM output
totals(
x,
which = c("imputed", "fitted", "both"),
obs = FALSE,
level = NULL,
long = FALSE
)
x |
TRIM output structure (i.e., output of a call to |
which |
(character) Select what totals to compute (see |
obs |
(logical) Flag to include total observations (or not). |
level |
(numeric) The confidence level required. If NULL, no confidence intervals are calculated. |
long |
(logical) Flag to return a tidy long table |
A data.frame with subclass trim.totals
(for pretty-printing). The columns are time, fitted
and se_fit (for standard error), and/or imputed
and se_imp, depending on the selection.
In case long=TRUE a long table is returned, and a different naming convention is used,
e.g., imputed/fitted info is in column series,
and standard error are always in column SE
The idea of TRIM is to impute those site-time combinations where
no counts are available. Time-totals (i.e. summed over sites) can be obtained
for two cases:
"imputed": Time totals are computed after replacing missing values with values predicted by the model.
"fitted": Time totals are computed after replacing both missing values and observed values with
values predicted by the model.
Other analyses:
coef.trim(),
confint.trim(),
gof(),
index(),
now_what(),
overall(),
overdispersion(),
plot.trim.index(),
plot.trim.overall(),
plot.trim.smooth(),
results(),
serial_correlation(),
summary.trim(),
trendlines(),
trim(),
vcov.trim(),
wald()
data(skylark)
z <- trim(count ~ site + time, data=skylark, model=2, changepoints=c(3,5))
totals(z)
totals(z, "both") # mimics classic TRIM
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.