Last data update: 2014.03.03

R: Displaying 'summary.gbp' Class
print.summary.gbpR Documentation

Displaying 'summary.gbp' Class

Description

summary(gbp.object) enables users to see a compact summary of estimation result.

Usage

## S3 method for class 'summary.gbp'
print(x, ...)

Arguments

x

a resultant object of gbp function.

...

further arguments passed to other methods.

Details

The summary has three parts depending on the model fitted by gbp; Main Summary,
Second-level Variance Component Estimation Summary, and Regression Summary (if fitted).

A display of Main Summary changes depending on whether all the groups (units) has the same standard error for Gaussian data (or the same total number of trials for Binomial and Poisson data). If they are not the same, Main Summary lists groups (units) with minimum, median, and maximum values of the standard error for Gaussian data (or of the total number of trials for Binomial and Poisson data). And the last row of Main Summary is about the overall average for all the groups (units) within each column. Note that this last row is not an average over displayed groups (units) above.

If groups (units) have the same standard error for Gaussian (or the same total number of trials for Binomial and Poisson), Main Summary lists groups (units) with minimum, median, and maximum values of the sample mean.

For reference, if there are several units with the same median value, they will show up with numbering.

The second part is about the Second-level Variance Component Estimation Summary. For reference, the second level variance component can be interpreted as variation among the first-level parameters (θ_j) or variance in ensemble information. It is A for Gaussian, μ0_j / r for Poisson, and μ0_j (1 - μ0_j) / (r + 1) for Binomial data. To be specific, this part shows estimate of α (a posterior mode) defined as log(A) for Gaussian or log(1 / r) for Binomial and Poisson data, and its standard error.

The last part depends on whether gbp fitted a regression or not. For reference, gbp fits a regression if the second-level mean (mean.PriorDist) was not designated. In this case, summary(gbp.object) will display the result of regression fit.

Value

summary(gbp.object) shows a compact summary of estimation result such as:

Main summary
Unit w/ min(se or n)

an estimation result of a group (unit) with the minimum standard error for Gaussian or the minimum total number of trials for Binomial and Poisson data.

Unit w/ min(sample.mean)

appears instead of Group w/ min(se or n) when all the groups (units) have the same standard error for Gaussian or the same total number of trials for Binomial and Poisson data.

Unit w/ median(se or n)

an estimation result of group(s) (unit(s)) with the median standard error for Gaussian or the median total number of trials for Binomial and Poisson data.

Unit w/ median(sample.mean)

appears instead of Group w/ median(se or n) when all the groups (units) have the same standard error for Gaussian or the same total number of trials for Binomial and Poisson data.

Unit w/ max(se or n)

an estimation result of a group (unit) with the maximum standard error for Gaussian or the maximum total number of trials for Binomial and Poisson data.

Unit w/ max(sample.mean)

appears instead of Group w/ max(se or n) when all the groups (units) have the same standard error for Gaussian or the same total number of trials for Binomial and Poisson data.

Overall Means

the overall average for all the groups (units) within each column.

Second-level Variance Component Estimation Summary
post.mode.alpha

a posterior mode of α defined as log(A) for Gaussian or log(1 / r) for Binomial and Poisson data.

post.sd.alpha

standard deviation of the posterior distribution of alpha

post.mode.r

posterior mode of either r for Bianomial and Poisson models or A for Gaussian model.

post.median.alpha

posterior median of α for Bianomial model, if the acceptance-rejection method is used.

post.median.r

posterior median of r for Bianomial model, if the acceptance-rejection method is used.

Regression Summary (if fitted)
estimate

regression coefficient estimates.

se

estimated standard error of regression coefficients.

z.val

estimate / se.

p.val

two-sided p-values.

Author(s)

Hyungsuk Tak, Joseph Kelly, and Carl Morris

Examples


  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")
    summary(g)

    ###############################################################
    # Binomial Regression Interactive Multilevel Modeling (BRIMM) #
    ###############################################################

    b <- gbp(z, n, model = "binomial")
    summary(b)

    ##############################################################
    # Poisson Regression Interactive Multilevel Modeling (PRIMM) #
    ##############################################################

    p <- gbp(z, n, mean.PriorDist = 0.03, model = "poisson")
    summary(p)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(Rgbp)
Loading required package: sn
Loading required package: stats4

Attaching package: 'sn'

The following object is masked from 'package:stats':

    sd

Loading required package: mnormt
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/Rgbp/print.summary.gbp.Rd_%03d_medium.png", width=480, height=480)
> ### Name: print.summary.gbp
> ### Title: Displaying 'summary.gbp' Class
> ### Aliases: print.summary.gbp
> ### Keywords: methods
> 
> ### ** Examples
> 
> 
>   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")
>     summary(g)
Main summary:

                      obs.mean  se prior.mean shrinkage low.intv post.mean
Group with min(se)        1.14 0.6     0.0184     0.352   -0.254    0.7456
Group with median(se)    -2.15 1.0     0.0184     0.599   -2.426   -0.8501
Group with max(se)       -2.07 2.8     0.0184     0.916   -1.883   -0.1570
Overall Mean                   1.2     0.0184     0.614   -1.346    0.0184
                      upp.intv post.sd
Group with min(se)       1.823   0.529
Group with median(se)    0.463   0.736
Group with max(se)       1.423   0.842
Overall Mean             1.368   0.692


Estimation summary for the second-level variance component:
alpha = log(A) for Gaussian or alpha =  log(1/r) for Binomial and Poisson data:

 post.mode.alpha post.sd.alpha post.mode.A
          -0.344          0.62       0.709


Estimation summary for the regression coefficient :

      estimate    se z.val p.val
beta1    0.018 0.243 0.076  0.94
> 
>     ###############################################################
>     # Binomial Regression Interactive Multilevel Modeling (BRIMM) #
>     ###############################################################
> 
>     b <- gbp(z, n, model = "binomial")
>     summary(b)
Main summary:

                     obs.mean    n prior.mean shrinkage low.intv post.mean
Group with min(n)      0.0448   67     0.0285     0.914   0.0187    0.0299
Group with median(n)   0.0455  484     0.0285     0.595   0.0246    0.0354
Group with max(n)      0.0201 1340     0.0285     0.347   0.0166    0.0231
Overall Mean                   517     0.0285     0.609   0.0193    0.0285
                     upp.intv post.sd
Group with min(n)      0.0437 0.00640
Group with median(n)   0.0480 0.00600
Group with max(n)      0.0305 0.00354
Overall Mean           0.0393 0.00509


Estimation summary for the second-level variance component:
alpha = log(A) for Gaussian or alpha =  log(1/r) for Binomial and Poisson data:

 post.mode.alpha post.sd.alpha post.mode.r
           -6.57         0.606         712


Estimation summary for the regression coefficient :

      estimate    se   z.val p.val
beta1    -3.53 0.064 -55.225     0
> 
>     ##############################################################
>     # Poisson Regression Interactive Multilevel Modeling (PRIMM) #
>     ##############################################################
> 
>     p <- gbp(z, n, mean.PriorDist = 0.03, model = "poisson")
>     summary(p)
Main summary:

                     obs.mean    n prior.mean shrinkage low.intv post.mean
Group with min(n)      0.0448   67       0.03     0.911   0.0199    0.0313
Group with median(n)   0.0455  484       0.03     0.585   0.0256    0.0364
Group with max(n)      0.0201 1340       0.03     0.338   0.0170    0.0235
Overall Mean                   517       0.03     0.600   0.0201    0.0293
                     upp.intv post.sd
Group with min(n)      0.0454 0.00653
Group with median(n)   0.0491 0.00601
Group with max(n)      0.0310 0.00360
Overall Mean           0.0403 0.00517


Estimation summary for the second-level variance component:
alpha = log(A) for Gaussian or alpha = log(1/r) for Binomial and Poisson data:

 post.mode.alpha post.sd.alpha post.mode.r
           -6.53         0.576         684
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>