Skip to contents

Linear regression model of R_v on R_{v-1},...,R_{v-p}. (p=nrevs)

Usage

orthogonallyModel1(revisions.view, nrevs = 1, na.zero = FALSE)

Arguments

revisions.view

mts object. Vertical or diagonal view of the get_revisions() output

nrevs

Integer. Number of lags to consider.

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 = 4L)
revisions <- get_revisions(vintages, gap = 1)
orthogonallyModel1(revisions$diagonal_view)
#>                             N         R2         F intercept.estimate
#> [Release[3]]-[Release[2]]   6 0.03016567 0.1244157        -0.04145696
#> [Release[4]]-[Release[3]] NaN        NaN       NaN                NaN
#> [Release[5]]-[Release[4]] NaN        NaN       NaN                NaN
#>                           intercept.stderr intercept.pvalue x(1).estimate
#> [Release[3]]-[Release[2]]         1.201465        0.9741274    -0.2289974
#> [Release[4]]-[Release[3]]              NaN              NaN           NaN
#> [Release[5]]-[Release[4]]              NaN              NaN           NaN
#>                           x(1).stderr x(1).pvalue   skewness  kurtosis
#> [Release[3]]-[Release[2]]   0.6492215   0.7420956 -0.4712289 -1.115913
#> [Release[4]]-[Release[3]]         NaN         NaN        NaN       NaN
#> [Release[5]]-[Release[4]]         NaN         NaN        NaN       NaN
#>                           JarqueBera.value JarqueBera.pvalue BreuschPagan.R2
#> [Release[3]]-[Release[2]]        0.4444766         0.8007245        0.176979
#> [Release[4]]-[Release[3]]              NaN               NaN             NaN
#> [Release[5]]-[Release[4]]              NaN               NaN             NaN
#>                           BreuschPagan.value BreuschPagan.pvalue  White.R2
#> [Release[3]]-[Release[2]]          0.8601432           0.4061935 0.4753361
#> [Release[4]]-[Release[3]]                NaN                 NaN       NaN
#> [Release[5]]-[Release[4]]                NaN                 NaN       NaN
#>                           White.value White.pvalue     arch.R2 arch.value
#> [Release[3]]-[Release[2]]    2.852017    0.2402661 0.005718509 0.02859254
#> [Release[4]]-[Release[3]]         NaN          NaN         NaN        NaN
#> [Release[5]]-[Release[4]]         NaN          NaN         NaN        NaN
#>                           arch.pvalue
#> [Release[3]]-[Release[2]]   0.8657233
#> [Release[4]]-[Release[3]]         NaN
#> [Release[5]]-[Release[4]]         NaN