Description Usage Arguments Details Author(s) References See Also Examples
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).
1 2 3 4 |
prior |
An RBesT mixture object |
data |
individual data as in |
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. |
... |
Simply applies ess
to the posterior and subtracts the sample size.
Manuel Wiesenfarth
Wiesenfarth, M., Calderazzo, S. (2019). Quantification of Prior Impact in Terms of Effective Current Sample Size. Submitted.
ess, ecss
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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.