something like this. its not strictly correct from the Bayesian point of view,
but you can kind of do this to check if all coeffs are zero. easist if the
covariates are kind of centered.
n <- 100
x <- rnorm(n)
xx <- rnorm(n)
xxx <- rnorm(n)
y <- 1 + rnorm(n)
r <- inla(y ~ 1 + x + xx + xxx,
data = data.frame(y, x, xx, xxx),
family = "gaussian",
control.fixed = list(correlation.matrix = TRUE))
S <- r$misc$lincomb.derived.covariance.matrix
## remove the contribution from the intercept
S <- S[2:4, 2:4]
est <- r$summary.fixed$mean[2:4]
## this should be chisq_3 when there is no effects (about...)
sq <- as.numeric(est %*% solve(S) %*% est)
## some rough p-value (whatever it mean here)
1-pchisq(sq, df = 3)
> --
> You received this message because you are subscribed to the Google Groups "R-
> inla discussion group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
r-inla-discussion...@googlegroups.com.
> To view this discussion, visit
>
https://groups.google.com/d/msgid/r-inla-discussion-group/63c8a955-d0d6-41af-88af-1bc2166f7f88n%40googlegroups.com
> .
--
Håvard Rue
he...@r-inla.org