coef,VGMSFH-method {vmsae} | R Documentation |
Extract Coefficients from a VGMSFH Object
Description
This method extracts posterior mean estimates of model coefficients from a VGMSFH
object. It can return either fixed effect coefficients or spatial random effects.
Usage
## S4 method for signature 'VGMSFH'
coef(object, var_idx = 1, type = "fixed")
Arguments
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:
|
Value
A numeric vector of posterior means for the selected coefficient type.
Examples
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
[Package vmsae version 0.1.1 Index]