coef,VGMSFH-method | R Documentation |
This method extracts posterior mean estimates of model coefficients from a VGMSFH
object. It can return either fixed effect coefficients or spatial random effects.
## S4 method for signature 'VGMSFH'
coef(object, var_idx = 1, type = "fixed")
object |
An object of class |
var_idx |
Integer. The index of the variable of interest (for multivariate models). Default is |
type |
Character. The type of coefficient to extract. Options are:
|
A numeric vector of posterior means for the selected coefficient type.
library(vmsae)
example_model <- readRDS(system.file("example", "example_model.Rds", package = "vmsae"))
coef(example_model) # Get fixed effect coefficients
coef(example_model, type = "spatial") # Get spatial random effects
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.