Last data update: 2014.03.03

R: Summarizing BAE Sample Size Calculations
summary.BAEssdR Documentation

Summarizing BAE Sample Size Calculations

Description

summary method for class BAEssd.

Usage

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

Arguments

object

BAEssd object. Result from a Bayesian Average Error based sample size calculation.

...

Additional parameters passed to or from other methods.

Details

Creates a nice printout giving the Average Errors at the chosen sample size.

Value

Vector with 5 elements:

n

Selected sample size.

AE1

Average Bayes Type-I Error rate for the selected sample size.

AE2

Average Bayes Type-II Error rate for the selected sample size.

TWE

Total Weighted Error for the selected sample size.

TE

Total Error for the selected sample size.

See Also

ssd, summary

Examples

############################################################
# One-sample normal experiment with known variance.

# load suite of functions
f1 <- norm1KV.2sided(sigma=5,theta0=0,prob=0.5,mu=2,tau=1)

# compare results of fast method with general method
attach(f1)
ss1 <- ssd.norm1KV(alpha=0.25,w=0.5,logm=logm)
ss2 <- ssd.norm1KV.2sided(alpha=0.25,w=0.5)
detach(f1)

# look at structure
str(summary(ss1))

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(BAEssd)
Loading required package: mvtnorm
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/BAEssd/summary.BAEssd.Rd_%03d_medium.png", width=480, height=480)
> ### Name: summary.BAEssd
> ### Title: Summarizing BAE Sample Size Calculations
> ### Aliases: summary.BAEssd print.summary.BAEssd
> 
> ### ** Examples
> 
> ############################################################
> # One-sample normal experiment with known variance.
> 
> # load suite of functions
> f1 <- norm1KV.2sided(sigma=5,theta0=0,prob=0.5,mu=2,tau=1)

Loading the 'norm1KV.2sided' suite... 
  This suite contains functions pertaining to one-sample experiment 
  involving a normally distributed response with known variance. The 
  hypothesis of interest has a two-sided alternative.

> 
> # compare results of fast method with general method
> attach(f1)
> ss1 <- ssd.norm1KV(alpha=0.25,w=0.5,logm=logm)
> ss2 <- ssd.norm1KV.2sided(alpha=0.25,w=0.5)
> detach(f1)
> 
> # look at structure
> str(summary(ss1))
Class 'summary.BAEssd'  atomic [1:5] 65 0.0717 0.1766 0.1241 0.2482
  ..- attr(*, "alpha")= num 0.25
  ..- attr(*, "w")= num 0.5
  ..- attr(*, "TE")= num 0.248
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>