This repository has been archived by the owner on Dec 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
usingOutput.Rmd
42 lines (29 loc) · 1.64 KB
/
usingOutput.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
#title: "Bayesian mixed models, shrinkage, sparse and interaction kernel regression"
#author: "Luc Janss, Maria Izabel Cavassim Alves and Marni Tausen"
#date: "`r Sys.Date()`"
output:
md_document:
variant: markdown_github
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# R/bayz methods for summarizing, extracting and using output
- [summary](#Summary of output)
- [coef, fixef and ranef](#Coefficients estimates)
- [vcomp](#Variance components and PVEs)
- [Computing contrasts](#Computing constrasts)
# Summary of output
Use of summary() on the bayz output object produces a summary of parameter estimates from the fitted model
including convergence diagnostics and Highest Posterior Density (HPD) regions.
The summary() method only lists a limited number of the so-called "traced" parameters - these are model-parameters
for which all MCMC samples are saved in the output, allowing to compute convergence, HPD regions, and to plot traces
and densities (using plot()). The traced parameters by default include: all scalar variance parameters, estimated
variance-covariances up to dimension 4x4, the model mean, scalar regression coefficients,
coefficient estimates from fixed effects with up to 4 levels, and nested regressions with up to 4 levels.
# Coefficients estimates
Apart from using these functions, it is also quite straightforward to extract estimates directly from the bayz output object.
All estimates are stored in the output in a list called <output>$Estimates, which has named elements according to parameter names.
# Variance components and PVEs
The vcomp() method extracts variance estimates from the output.