rjdverse / rjdemetra

R interface to JDemetra+ v 2.x
https://rjdverse.github.io/rjdemetra
52 stars 16 forks source link

Differences in model identification #71

Closed Luis-Sanguiao closed 4 years ago

Luis-Sanguiao commented 4 years ago

We have found that sometimes, different models are gotten from tramoseats and jtramoseats under RSAfull. For example, in the following script:

library(RJDemetra)
Series <- c(72.6281163171451,77.5342185577308,77.6793203182148,73.9754281435273,78.8602906709867,71.5607940557733,78.7761854969021,57.5415184114791,
            88.8868128935516,87.9392593783652,82.6407219530581,83.7559793263989,75.2862896672088,77.3378070537983,84.7264793466943,73.3900622173558,
            81.4313873959502,77.0100515679069,82.9000373884145,60.7129675686799,86.3844532610367,93.4586155432813,85.5025992298168,84.7926023365146,
            82.3261500867011,84.107160329614,84.7153259668751,82.7104374900613,86.0390377461432,77.9167951151964,89.6899293983343,64.4923148990392,
            94.6848648210762,99.8698464805707,89.407887933418,89.598595516665,81.1183667834982,83.2028148714351,90.1468947009631,85.4048752679138,
            86.9554377206564,87.1120456465851,94.751777816826,66.7805037063278,102.534456642559,104.263514676553,93.3975882241738,97.7406046016076,
            84.7215691167001,84.7640026026874,99.5030144375273,88.24162845872,90.7950909641839,93.86215941388,94.9000244710819,70.6861161022699,
            99.1833130941934,97.5181183848882,98.9826592428193,99.4829062652243,84.0040885636849,92.4799205313577,102.293114451171,95.8544138744149,
            92.8309938408064,99.6661873467755,97.7532331885269,74.1267586446312,105.739879820549,104.467609299482,106.348179869106,102.551151328814,
            89.8254546519143,96.9106109837244,114.277606878281,91.9786441789908,105.114698504841,106.475454383814,103.073088617556,81.5959017595676,
            108.389378264487,112.639444040362,113.099244880022,109.190710057052,100.718527328318,101.337359968352,117.545113123276,101.72155364961,
            109.665600970986,111.801019633265,111.67845168897,87.3619286031375,111.1434842742,122.242803425994,116.449148766832,112.384421010449,
            106.905217518114,108.733813649498,105.936769842108,112.923693218609,101.203691792517,104.022188534472,113.611792277393,81.1046822727098,
            115.198423338365,115.572608113109,104.19465343414,106.602726642949,91.0561223201729,94.5043665409921,99.989262600378,92.7490668708657,
            91.469327968364,98.97580824153,105.980367450724,78.9615249684793,105.946329686165,107.196701964058,103.853216672333,108.153898429399,
            90.1594166363969,92.5903614494468,111.238079731772,95.3470836913178,94.5991691506152,106.478502469135,102.930089878673,82.0368155606732,
            107.820391229264,105.123943130708,105.889816265204,105.786330806794,91.025926887362,95.0163943645427,110.407055421509,93.3832438403154,
            97.4937730218706,99.7462082412085,100.214008184976,83.1452398966037,107.632614607355,100.306288593148,103.100291473817,101.333876311573,
            89.1184552456244,94.7230277699155,104.841776990274,92.1951469707634,94.5197722109131,98.3563843963119,96.4810032043022,87.9078219206552,
            94.6481022128639,99.645065832114,96.3531216321514,88.7341367987231,86.7589472063309,91.1769026411754,92.378738332134,97.4808856440539,
            94.1199838754449,94.3516535889806,101.300626627202,81.6499354267585,101.666572898549,105.534811444586,98.7124314260536,93.7185431850816,
            92.423493398647,92.023618385911,101.080433801287,99.4917878142833,98.5972598564158,99.7634714561541,108.59804327581,86.4833217563674,
            108.57327829376,110.457113623138,102.677926760118,101.472379881103,95.9282028722383,96.6122404709286,110.359050836631,101.06267843831,
            98.6333893217036,101.910797150483,114.679945448872,89.5639236165589,115.861454487731,117.035974911414,105.883025822793,106.60620908963,
            98.4298020027217,104.105412938303,119.320313163457,112.414034596929,110.728098085692,111.825540125144,115.286955778855,100.806300355417,
            121.879926348543,118.852142974241,118.504652099556,110.608983436192,107.840260934333,107.806188401323,127.138688377076,111.977261764024,
            120.311815875365,120.776115917404,120.349979329547,109.204511121794,124.581917445174,124.067789872956,125.397556944451,111.635816839484)
s464 <- ts(Series, frequency = 12, c(2000, 1))
s464_sa <- tramoseats(s464, spec = "RSAfull") # Compare the outputs when jtramoseats is used instead
wk <- new_workspace()
mp <- new_multiprocessing(wk, "sa1")
add_sa_item(wk, "sa1", s464_sa, "tramoseats")
compute(wk)
s464_sa_item <- get_object(mp, 1)
get_model(s464_sa_item, wk)

When tramoseats is called, we get 6 regressors for week days. We get one regressor if jtramoseats is called instead, which actually agrees with the GUI. We have observed similar problems with other series, this one is just a reproducible example.

palatej commented 4 years ago

I Luis,

Thank you for your remark. I have just corrected the bug you found. The correction will be available in the next release (probably before Easter). See #72 for details.

Jean