| n_effective | R Documentation |
Computes the effective sample size recommended by Wulff and Taylor (2024)
for calibrating alpha with clustered (panel) data, where observations are
not independent and the nominal sample size overstates the information in
the data: n_e = n * (se / se_robust)^2, the total number of
observations deflated by the squared ratio of the classical to the
cluster-robust standard error. Vectorized over its arguments (recycled).
n_effective(n, se, se_robust)
n |
Total number of observations. A positive numeric vector. |
se |
The classical (non-robust) standard error of the coefficient. |
se_robust |
The cluster-robust standard error of the same coefficient. |
Wulff and Taylor (2024) recommend calibrating alpha with the total number
of observations, which is the conservative choice, and then checking
whether conclusions survive when alpha and the Bayes factor are
recomputed with the effective sample size. Because cluster-robust
standard errors typically exceed classical ones, n_effective() is
typically smaller than n, which yields a larger calibrated alpha.
A numeric vector with the effective sample size.
Wulff, J. N., & Taylor, L. (2024). How and why alpha should depend on sample size: A Bayesian-frequentist compromise for significance testing. Strategic Organization, 22(3), 550-581. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1177/14761270231214429")}
alphaN()
# A regression on 237 clustered observations where the cluster-robust
# standard error is twice the classical one implies an effective sample
# size four times smaller (Wulff & Taylor, 2024, Example 3)
n_effective(n = 237, se = 0.1, se_robust = 0.2)
# Alpha for moderate evidence at the nominal and the effective sample size
alphaN(n = 237, BF = 3, method = "robust")
alphaN(n = n_effective(237, 0.1, 0.2), BF = 3, method = "robust")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.