Learn R Programming

Rgbp (version 1.1.4)

print.summary.gbp: Displaying 'summary.gbp' Class

Description

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

Usage

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

Arguments

x

a resultant object of gbp function.

...

further arguments passed to other methods.

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 \(\alpha\) defined as log(A) for Gaussian or log(\(\frac{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 \(\alpha\) for Bianomial model, if the accept-reject method is used.

post.median.r

posterior median of \(r\) for Bianomial model, if the accept-reject 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.

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 (\(\theta_{j}\)) or variance in ensemble information. It is A for Gaussian, \(\frac{\mu_{0j}}{r}\) for Poisson, and \(\frac{\mu_{0j}(1 - \mu_{0j})}{r}\) for Binomial data. To be specific, this part shows estimate of \(\alpha\) (a posterior mode) defined as log(A) for Gaussian or log(\(\frac{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.

Examples

Run this code
# NOT RUN {
  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)

# }

Run the code above in your browser using DataLab