# print.gbp: Displaying 'gbp' Class In Rgbp: Hierarchical Modeling and Frequency Method Checking on Overdispersed Gaussian, Poisson, and Binomial Data

## Description

`print.gbp` enables users to see a compact group-level (unit-level) estimation result of `gbp` function.

## Usage

 ```1 2``` ```## S3 method for class 'gbp' print(x, sort = TRUE, ...) ```

## Arguments

 `x` a resultant object of `gbp` function. `sort` `TRUE` or `FALSE` flag. If `TRUE`, the result will appear by the order of `se` for Gaussian, or of `n` for Binomial and Poisson data. If `FALSE`, it will do by the order of data input. Default is `TRUE`. `...` further arguments passed to other methods.

## Details

As for the argument `x`, if the result of `gbp` is designated to `b` like
"`b <- gbp(z, n, model = "binomial")`", the argument `x` is supposed to be `b`.

We do not need to type "`print(b, sort = TRUE)`" but "`b`" itself is enough to call
`print(b, sort = TRUE)`. But if we want to see the result NOT sorted by the order of `se` for Gaussian, or of `n` for Binomial and Poisson data, `print(b, sort = FALSE)` will show the result by the order of data input.

## Value

`print(gbp.object)` will display:

 `obs.mean` sample mean of each group `se` if Gaussian data, standard error of each group `n` if Binomial or Poisson data, total number of trials of each group `X` a covariate vector or matrix if designated. NA if not `prior.mean` numeric if entered, NA if not entered `prior.mean.hat` estimate of prior mean by a regression if prior mean is not assigned a priori. The variable name on the display will be "prior.mean" `prior.mean.AR` the posterior mean(s) of the expected random effects, if the acceptance-rejection method is used for the binomial model. The variable name on the display will be "prior.mean". `shrinkage` shrinkage estimate of each group (adjusted posterior mean) `shrinkage.AR` the posterior mean of the shrinkage factor, if the acceptance-rejection method is used for the binomial model. The variable name on the display will be "shrinkage". `low.intv` lower bound of 100*confidence.lvl% posterior interval `post.mean` posterior mean of each group `upp.intv` upper bound of 100*confidence.lvl% posterior interval `post.sd` posterior standard deviation of each group

## Author(s)

Hyungsuk Tak, Joseph Kelly, and Carl Morris

## Examples

 ``` 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``` ``` data(hospital) z <- hospital\$d n <- hospital\$n y <- hospital\$y se <- hospital\$se ################################################################################### # We do not have any covariates and do not know a mean of the prior distribution. # ################################################################################### ############################################################### # Gaussian Regression Interactive Multilevel Modeling (GRIMM) # ############################################################### g <- gbp(y, se, model = "gaussian") g print(g, sort = FALSE) ############################################################### # Binomial Regression Interactive Multilevel Modeling (BRIMM) # ############################################################### b <- gbp(z, n, model = "binomial") b print(b, sort = FALSE) ############################################################## # Poisson Regression Interactive Multilevel Modeling (PRIMM) # ############################################################## p <- gbp(z, n, mean.PriorDist = 0.03, model = "poisson") p print(p, sort = FALSE) ```

Rgbp documentation built on June 6, 2017, 1:01 a.m.