summary.hdpGLM  R Documentation 
This is a generic summary function that describes the output of the function hdpGLM
## S3 method for class 'hdpGLM'
summary(object, ...)
object 
an object of the class 
... 
Additional arguments accepted are:

The function hdpGLM returns a list with the samples from the posterior distribution along with other elements. That list contains an element named context.cov
that connects the indexed "C" created during the estimation and the contextlevel covariates. So each unique contextlevel covariate gets an index during the estimation. The algorithm only requires the contextlevel covariates, but it creates such index C to help the estimation. If true.beta is provided, it must contain indexes for the context as well, which indicates the context of each specific linear coefficient beta
. Such index will probably be different from the one created by the algorithm. Therefore, when the true.beta
is provided, we need to connect the context index C generated by the algorithm and the column j in the true.beta data.frame in order to compare the true values and the estimated value for each context. That is why we need the values of the contextlevel covariates as well. The summary uses them as key to merge the true and the estimated values for each context. The true and estimated clusters are matched based on the shortest distance between the estimated posterior average and the true value in each context because the labels of the clusters in the estimation can vary, even thought the same data points are classified in the same clusters.
The function returns a list with two data.frames. The first summarizes the posterior distribution of the linear coefficients beta
. The mean, median, and the 95% HPD interval are provided. The second data.frame contains the summary of the posterior distribution of the parameter tau
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.