geplot {BayesTwin} | R Documentation |
This function plots the 95% credibility region of a GxE interaction effect.
geplot(var_a, samples_beta0, samples_beta1, main, xlab, ylab, col, ...)
var_a |
A single value representing the posterior point estimate for genetic variance |
samples_beta0 |
A vector representing draws from the posterior distribution of beta0, as produced by the main function |
samples_beta1 |
A vector representing draws from the posterior distribution of beta1, as produced by the main function |
main |
An overall title for the plot |
xlab |
A title for the x axis |
ylab |
A title for the y axis |
col |
Color of the lines |
... |
Further arguments for the default S3 plot method |
The 95 % credibility region for the GxE interaction effect is displayed for the entire range of estimated genotypic values in the interval of -2 and 2 standard deviations of the posterior point estimate of genetic variance.
The function expects as input the posterior point estimate for genetic variance and two vectors representing draws from the posterior distributions of beta0 and beta1 respectively, as produced by the main function IRT_twin
of this package.
Plot of the 95% credibility region of the GxE interaction.
Inga Schwabe
#Using the output to plot the 95% credibility region
data(results)
geplot(results$var_a, results$samples_beta0, results$samples_beta1)