Compute scale of a precision matrix using R-INLA
.
get_scale.Rd
Takes the riebler_gv
of the generalised inverse, as implemented by INLA::inla.qinv
.
By default it is assumed that the graph is fully connected.
Arguments
- Q
A (square, symmetric) precision matrix.
- constraint
A list with arguments
A
ande
which imposes the constraintAu = e
(where the precision ofu
isQ
). See the?INLA::f
argumentextraconstr
. Ifconstraint
is the default value then this is a sum-to-zero constraint.
Examples
nb <- sf_to_nb(mw)
#> Error in .class1(object): object 'mw' not found
Q <- nb_to_precision(nb)
#> Error in nb_to_precision(nb): object 'nb' not found
get_scale(Q)
#> Error in nrow(Q): object 'Q' not found