Plot the posterior distribution of the linear parameters beta for each context
plot_beta(
samples,
X = NULL,
context.id = NULL,
true.beta = NULL,
title = NULL,
subtitle = NULL,
plot.mean = FALSE,
plot.grid = FALSE,
showKhat = FALSE,
col = NULL,
xlab.size = NULL,
ylab.size = NULL,
title.size = NULL,
legend.size = NULL,
xtick.distance = NULL,
left.margin = 0,
ytick.distance = NULL,
col.border = "white"
)
an output of the function hdpGLM
a string vector with the name of the first-level covariates whose associated tau should be displayed
string with the name of the column containing the labels identifying the contexts. This variable should have been specified when the estimation was conducted using the function hdpGLM
.
a data.frame
with the true values of the linear coefficients beta
if they are known. The data.frame
must contain a column named j
with the index of the context associated with that particular linear coefficient beta
. It must match the indexes used in the data set for each context. Another column named k
must be provided, indicating the cluster of beta
, and a column named Parameter
with the name of the linear coefficients (beta1
, beta2
, ..., beta_dx
, where dx
is the number of covariates at the individual level, and beta1 is the coefficient of the intercept term). It must contain a column named True
with the true value of the betas
. Finally, the data.frame
must contain columns with the context-level covariates as used in the estimation of the hdpGLM function (see Details below).
string, title of the plot
string, the subtitle of the plot
boolean, if TRUE
the posterior mean of every cluster is displayed
boolean, if TRUE
a grid is displayed in the background
boolean, if TRUE
a message with the number of estimated clusters by context is displayed
string, color of the densities
numeric, size of the breaks in the x-axis
numeric, size of the breaks in the y-axis
numeric, size of the title
numeric, size of the legend
numeric, distance between x-axis marks and bottom of the figure
numeric, distance between left margin and left side of the figure
numeric, distance between y-axis marks and bottom of the figure
string, color of the border of the densities