Last data update: 2014.03.03

R: Summarizing Estimation Result
summary.gbpR Documentation

Summarizing Estimation Result

Description

summary.gbp prepares a summary of estimation result saved in the object defined as "gbp" class creating "summary.gbp" class

Usage

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

Arguments

object

a resultant object of gbp function.

...

further arguments passed to other methods.

Value

summary.gbp prepares below contents:

main

a table to be displayed by summary(gbp.object). print.summary.gbp.

sec.var

a vector containing an estimation result of the second-level variance component. print.summary.gbp.

reg

a vector composed of a summary of regression fit (if fitted). print.summary.gbp.

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/summary.gbp.Rd_%03d_medium.png", width=480, height=480)
> ### Name: summary.gbp
> ### Title: Summarizing Estimation Result
> ### Aliases: summary.gbp
> ### Keywords: method
> 
> ### ** 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 
>