Estimate bias using t-test and augmented t-test
Arguments
- revisions.view
mts object. Vertical or diagonal view of the
get_revisions()
output- na.zero
Boolean whether missing values should be considered as 0 or rather as data not (yet) available (the default).
Examples
## Simulated data
df_long <- simulate_long(
n_period = 10L * 4L,
n_revision = 5L,
periodicity = 4L,
start_period = as.Date("2010-01-01")
)
## Create vintage and test
vintages <- create_vintages(df_long, periodicity = 4)
revisions <- get_revisions(vintages, gap = 1)
bias(revisions$diagonal_view)
#> N estimate stderr tstat pvalue
#> [Release[2]]-[Release[1]] 24 -0.54510403 0.49669780 -1.0974561 0.28379928
#> [Release[3]]-[Release[2]] 16 0.23607525 0.36069152 0.6545074 0.52269481
#> [Release[4]]-[Release[3]] 14 -0.25693314 0.12186524 -2.1083381 0.05497388
#> [Release[5]]-[Release[4]] 6 0.07740432 0.06517643 1.1876121 0.28832326
#> ar(1) stderr.adjusted tstat.adjusted
#> [Release[2]]-[Release[1]] -0.1498687 0.42708187 -1.2763455
#> [Release[3]]-[Release[2]] 0.4195115 0.56403825 0.4185448
#> [Release[4]]-[Release[3]] 0.3617668 0.17800884 -1.4433730
#> [Release[5]]-[Release[4]] -0.6275096 0.03118073 2.4824407
#> pvalue.adjusted
#> [Release[2]]-[Release[1]] 0.21088964
#> [Release[3]]-[Release[2]] 0.68894287
#> [Release[4]]-[Release[3]] 0.19490637
#> [Release[5]]-[Release[4]] 0.01976918