| fitted.stLMM | R Documentation |
Computes posterior fitted values for the original data used to fit an
stLMM model. These fitted values include all model components that were
fit: formula offsets, fixed effects, explicit grouped random effects, and
saved or recovered structured latent process effects. Binomial and probit
fitted values default to posterior fitted probabilities, and negative-binomial fitted values default to
posterior fitted mean counts.
## S3 method for class 'stLMM'
fitted(object, summary = TRUE,
sub_sample = list(start = 1L, thin = 1L), scale = c("response", "link"),
...)
object |
An object returned by |
summary |
Logical; if |
sub_sample |
List with optional |
scale |
For |
... |
Currently unused. |
This method does not predict at new locations. For models with structured
process terms, fitted values require saved or recovered latent process samples.
For augmented non-Gaussian process models, stLMM() saves in-chain process draws by
default as save_process = list(start = 1, thin = 1) and
recover() subsets them. For Gaussian process models, call
recover() on the fitted object to make those samples available.
If summary = TRUE, a numeric vector of posterior mean fitted values for
the original fitted data rows, including rows whose response was missing at fit
time. If summary = FALSE, a matrix with posterior draws in rows and
original data rows in columns. The matrix has a draw_index
attribute giving the original MCMC iteration indices used and, for
summary = FALSE non-Gaussian fits, a scale attribute.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.