ehss: Compute Effective Historical Sample Size (EHSS)

Description Usage Arguments Details Author(s) References See Also Examples

Description

Compute Effective Historical Sample Size (EHSS). This is the prior effective sample size applied to the posterior subtracting the data sample size, see also Wiesenfarth and Calderazzo (2019).

Usage

1
2
3
4
## S3 method for class 'normMix'
ehss(prior, data, n, m, se, method = c("mix.moment", "moment", "morita"), ...)
## S3 method for class 'betaMix'
ehss(prior, data, n, r, method = c("mix.moment", "moment", "morita"), ...)

Arguments

prior

An RBesT mixture object

data

individual data as in postmix. If the individual data is not given, then summary data has to be provided

n

sample size

r

number of successes

m

sample mean

se

sample standard error

method

Selects the used method. Can be either mix.moment, moment or morita.

...

Details

Simply applies ess to the posterior and subtracts the sample size.

Author(s)

Manuel Wiesenfarth

References

Wiesenfarth, M., Calderazzo, S. (2019). Quantification of Prior Impact in Terms of Effective Current Sample Size. Submitted.

See Also

ess, ecss

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
######################
# Normal Outcome

  # standard deviation
    sigma=1
  # baseline
    rob=c(0,10)
    vague <-mixnorm(vague=c(1, rob), sigma=sigma)
  # prior with nominal EHSS=50
    inf=c(0,1/sqrt(50))
    info <-mixnorm(informative=c(1, inf), sigma=sigma)
  # robust mixture
    mix50 <-mixnorm(informative=c(.5, inf),vague=c(.5, rob), sigma=sigma)
  
  

  m=.2 #data mean
  n=100 # sample size
  
  ehss(as.powerprior(info),m=m,n=n,se=sigma/sqrt(n))
  
  ehss(mix50,m=m,n=n,se=sigma/sqrt(n),method="morita")
  ehss(mix50,m=m,n=n,se=sigma/sqrt(n),method="moment")
  ehss(mix50,m=m,n=n,se=sigma/sqrt(n),method="mix.moment")

wiesenfa/ESS documentation built on June 19, 2019, 4:19 p.m.