├── .Rbuildignore ├── .gitattributes ├── .github └── workflows │ ├── ci-win.yaml │ └── ci.yaml ├── .gitignore ├── ChangeLog ├── DESCRIPTION ├── LICENSE ├── NAMESPACE ├── R ├── checkX13binary.R ├── init.R ├── supportedPlatform.R ├── x13binary-package.R └── x13path.R ├── README.md ├── cleanup ├── inst ├── AUTHORS ├── COPYRIGHT ├── bin │ └── README ├── testdata │ └── Testairline.spc └── tools │ └── build.sh ├── man ├── checkX13binary.Rd ├── supportedPlatform.Rd ├── x13binary-package.Rd └── x13path.Rd ├── src ├── Makefile ├── Makefile.win └── install.libs.R ├── tests ├── simpleTest.R └── simpleTest.Rout.save └── tools └── x13as_html ├── .gitignore ├── aaamain.f ├── abend.f ├── ac02ae.i ├── acf.f ├── acfar.f ├── acfast.i ├── acfdgn.f ├── acfhdr.f ├── acfptr.prm ├── acfst.i ├── across.i ├── addadj.f ├── addate.f ├── addeas.f ├── addfix.f ├── addlom.f ├── addmat.f ├── addmul.f ├── addotl.f ├── addsef.f ├── addsub.f ├── addtd.f ├── addusr.f ├── adestr.f ├── adj.cmn ├── adjreg.f ├── adjsrs.f ├── adlabr.f ├── adotss.f ├── adpdrg.f ├── adrgef.f ├── adrgim.f ├── adsncs.f ├── adthnk.f ├── adxser.cmn ├── aggmea.f ├── agr.cmn ├── agr.f ├── agr1.f ├── agr2.f ├── agr3.f ├── agr3s.f ├── agrsrs.cmn ├── agrxpt.f ├── altundovrtst.f ├── amdest.f ├── amdfct.f ├── amdid.f ├── amdid2.f ├── amdprt.f ├── amic.i ├── amidot.f ├── analts.f ├── ansub1.f ├── ansub10.f ├── ansub11.f ├── ansub2.f ├── ansub3.f ├── ansub4.f ├── ansub5.f ├── ansub7.f ├── ansub8.f ├── ansub9.f ├── antilg.f ├── apply.f ├── ar30rg.f ├── arfit.f ├── arflt.f ├── arima.cmn ├── arima.f ├── armacr.f ├── armafl.f ├── armats.f ├── arspc.f ├── autoer.f ├── automd.f ├── automx.f ├── autoq.cmn ├── avedur.f ├── aver.f ├── averag.f ├── bakusr.f ├── bartlett.i ├── bench.f ├── bench.i ├── bestmd.f ├── bkdfmd.f ├── bldcov.f ├── blddif.f ├── bstget.f ├── bstmdl.cmn ├── bstmdl.f ├── btrit.f ├── buffers.i ├── build.comp.i ├── build.i ├── build.prm ├── calc.i ├── calcqs.f ├── calcqs2.f ├── calcsc.f ├── calfor.i ├── calshr.i ├── cchars.i ├── ceilng.f ├── change.f ├── chisq.f ├── chitst.f ├── chkadj.f ├── chkchi.f ├── chkcvr.f ├── chkeas.f ├── chkmu.f ├── chkorv.f ├── chkrt1.f ├── chkrt2.f ├── chkrts.f ├── chksmd.f ├── chktrn.f ├── chkuhg.f ├── chkurt.f ├── chkzro.f ├── chqsea.f ├── chrt.cmn ├── chrt.f ├── chsppf.f ├── chusrg.f ├── clrotl.f ├── clsgrp.f ├── cmpchi.f ├── cmpflts.i ├── cmpstr.f ├── cmpsvl.i ├── cmptbl.i ├── cncrnt.f ├── cnvfil.f ├── cnvfmt.f ├── cnvmdl.f ├── cogreg.prm ├── cogreg.var ├── coladd.f ├── combft.f ├── compb.f ├── compcrodiag.f ├── compdiag.f ├── complagdiag.f ├── compmse.f ├── compmsealt.f ├── component.f ├── component.i ├── comprevs.f ├── constant.f ├── copy.f ├── copycl.f ├── copylg.f ├── cormtx.f ├── cornom.f ├── corplt.f ├── count.i ├── covar.f ├── cpyint.f ├── cpymat.f ├── crosco.f ├── cross.i ├── cse.i ├── ctod.f ├── ctodat.f ├── ctoi.f ├── cumnor.f ├── cvcmma.f ├── cvdttm.f ├── cvrerr.f ├── cxfinal.i ├── date.i ├── daxpy.f ├── dcopy.f ├── ddot.f ├── decibl.f ├── deftab.prm ├── deftab.var ├── delstr.f ├── deltst.f ├── desadj.prm ├── desadj.var ├── descm2.prm ├── descm2.var ├── descmp.prm ├── descmp.var ├── desdg2.prm ├── desdg2.var ├── desdgn.prm ├── desdgn.var ├── desfc2.prm ├── desfc2.var ├── desfct.prm ├── desfct.var ├── desfsa.prm ├── desfsa.var ├── desmdl.prm ├── desmdl.var ├── desreg.f ├── desset.prm ├── desset.var ├── desspc.prm ├── desspc.var ├── dessrs.prm ├── dessrs.var ├── desst2.prm ├── desst2.var ├── desx11.prm ├── desx11.var ├── desxrg.prm ├── desxrg.var ├── dets.i ├── devlpl.f ├── dfdate.f ├── dgefa.f ├── dgesl.f ├── dgnsvl.i ├── difflt.f ├── dimensions.i ├── dinvnr.f ├── dirs.i ├── divgud.f ├── divsub.f ├── dlrgef.f ├── dlrgrw.f ├── dlusrg.f ├── dot.f ├── dpeq.f ├── dpmpar.f ├── dppdi.f ├── dppfa.f ├── dppsl.f ├── dsarma.f ├── dscal.f ├── dsolve.f ├── dtoc.f ├── easaic.f ├── easter.f ├── editor.f ├── eee.i ├── eltfcn.f ├── eltlen.f ├── emcomp.f ├── ends.f ├── endsf.f ├── enorm.f ├── entsch.f ├── errhdr.f ├── error.cmn ├── estb.i ├── estgc.i ├── estrmu.f ├── euclid.f ├── exctma.f ├── extend.cmn ├── extend.f ├── extsgnl.f ├── f3cal.f ├── f3gen.f ├── fclose.f ├── fcnar.f ├── fcstxy.f ├── fctlbl.prm ├── fctlbl.var ├── fcttitle.prm ├── fcttitle.var ├── fdate.f ├── fdjac2.f ├── fft.i ├── fgen.f ├── filetb.cmn ├── filext.prm ├── filext.var ├── fis.f ├── fitmod.i ├── fopen.f ├── force.cmn ├── forcst.f ├── fouger.f ├── frctbl.i ├── fstop.f ├── ftest.f ├── func.i ├── func2.i ├── func3.i ├── func4.i ├── func5.i ├── func5f1.i ├── fvalue.f ├── fxreg.cmn ├── fxshfr.f ├── gauss.f ├── gendff.f ├── genfoot.f ├── genfor.f ├── genindex.f ├── gennpsa.f ├── genqs.f ├── genrtt.f ├── genskip.f ├── genssm.f ├── getadj.f ├── getarg.cmn ├── getarg.f ├── getarg.prm ├── getchk.f ├── getchr.f ├── getcmp.f ├── getdat.f ├── getdbl.f ├── getdes.f ├── getdiag.f ├── getfcn.f ├── getfrc.f ├── getgr.f ├── getid.f ├── getidm.f ├── getint.f ├── getivc.f ├── getmdl.f ├── getmtd.f ├── getopr.f ├── getprt.f ├── getreg.f ├── getrev.f ├── getrevdec.f ├── getsav.f ├── getsma.f ├── getsmat.f ├── getsrs.f ├── getssp.f ├── getstr.f ├── getsvec.f ├── getsvl.f ├── gettpltz.f ├── gettr.f ├── gettrc.f ├── getttl.f ├── getx11.f ├── getxop.f ├── getxtd.f ├── glbshk.f ├── global.cmn ├── gmeta.prm ├── gmeta.var ├── gnfcrv.f ├── goodob.cmn ├── grzlst.f ├── grzmth.f ├── grzmyr.f ├── gtarg.f ├── gtarma.f ├── gtauto.f ├── gtautx.f ├── gtdcnm.f ├── gtdcvc.f ├── gtdpvc.f ├── gtdtvc.f ├── gtedit.f ├── gtestm.f ├── gtfcst.f ├── gtfldt.f ├── gtfrcm.f ├── gtfree.f ├── gtinpt.f ├── gtinvl.f ├── gtmdfl.f ├── gtmtdt.f ├── gtmtfl.f ├── gtnmvc.f ├── gtotlr.f ├── gtpdrg.f ├── gtrgdt.f ├── gtrgpt.f ├── gtrgvl.f ├── gtrvst.f ├── gtseat.f ├── gtspec.f ├── gttrmo.f ├── gtwacf.f ├── gtx11d.f ├── gtx12s.f ├── gtxreg.f ├── hdflag.i ├── hender.f ├── hender.prm ├── hiddn.cmn ├── hinge.f ├── hist.f ├── histx.f ├── hndend.f ├── hndtrn.f ├── holday.f ├── holidy.f ├── hrest.f ├── hspect.i ├── html.i ├── htmlfile.cmn ├── htmlfortable.f ├── htmlout.cmn ├── htmlout.f ├── htmlout.prm ├── htmlutil.f ├── idamax.f ├── iddiff.f ├── idmdl.f ├── idotlr.f ├── idpeak.f ├── inbtwn.f ├── indhtml.i ├── indx.f ├── initdg.f ├── initst.f ├── inpt.cmn ├── inpt2.cmn ├── inpter.f ├── insdbl.f ├── insint.f ├── inslg.f ├── insopr.f ├── insort.f ├── insptr.f ├── insstr.f ├── intfmt.f ├── intgpg.f ├── intinp.f ├── intlst.f ├── intrpp.f ├── intsrt.f ├── invfcn.f ├── invmat.f ├── ipmpar.f ├── iscrfn.f ├── isdate.f ├── isfals.f ├── isfixd.f ├── ispeak.f ├── ispos.f ├── issame.f ├── istrue.f ├── itoc.f ├── itrerr.f ├── kdate.prm ├── kfcn.f ├── kwtest.f ├── lassol.f ├── lendp.f ├── level.prm ├── level.var ├── lex.f ├── lex.i ├── lgnrmc.f ├── lkhd.cmn ├── lkshnk.f ├── lmdif.f ├── lmpar.f ├── loadxr.f ├── locshk.f ├── logar.f ├── logdet.f ├── logtrace.i ├── lomaic.f ├── lstpth.f ├── lzero.cmn ├── m2q.f ├── makadj.f ├── makefile.gf ├── makotl.f ├── makttl.f ├── map.f ├── matrix.f ├── matrix1.i ├── matrix2.i ├── maxidx.f ├── maxlag.f ├── maxvec.f ├── mdlchk.f ├── mdldat.cmn ├── mdldg.cmn ├── mdlfix.f ├── mdlinp.f ├── mdlint.f ├── mdlmch.f ├── mdlset.f ├── mdlsvl.i ├── mdltbl.i ├── mdssln.f ├── meancra.f ├── medabs.f ├── metadata.cmn ├── metadata.prm ├── mflag.f ├── min.i ├── minim2.f ├── missng.cmn ├── mkback.f ├── mkealb.f ├── mkfreq.f ├── mklnlb.f ├── mkmdsn.f ├── mkmdsx.f ├── mkmetahtmlfile.f ├── mkoprt.f ├── mkotky.f ├── mkpeak.f ├── mkshdr.f ├── mkspky.f ├── mksplb.f ├── mkspst.f ├── mkssky.f ├── mkstlb.f ├── mktdlb.f ├── mlist.f ├── mltpos.f ├── model.cmn ├── model.prm ├── models.i ├── month.f ├── mq3.cmn ├── mstest.f ├── mulmat.f ├── mulqmat.f ├── mulref.f ├── mulsca.f ├── mult.f ├── mult0.f ├── mult1.f ├── mult2.f ├── mxpeak.f ├── nblank.f ├── newest.f ├── newmdl.cmn ├── nextk.f ├── nmlmdl.f ├── nofcst.f ├── notset.prm ├── npsa.f ├── nrmtst.f ├── nrmtst.var ├── nsums.i ├── numaff.f ├── numfmt.f ├── olsreg.f ├── opnfil.f ├── orisrs.cmn ├── otlrev.cmn ├── otsort.f ├── otxrev.cmn ├── outchr.f ├── pacf.f ├── pass0.f ├── pass2.f ├── pctrit.f ├── peaks.i ├── phasegain.f ├── picktd.cmn ├── pinno.i ├── polyml.f ├── polynom.f ├── polynom.i ├── ppnd.f ├── pracf2.f ├── prafce.f ├── pragr2.f ├── prarma.f ├── preadtr.i ├── prfcrv.f ├── priadj.cmn ├── prior.cmn ├── prior.prm ├── pritd.f ├── prittl.cmn ├── priusr.cmn ├── prlkhd.f ├── procflts.f ├── prothd.f ├── prprad.f ├── prrvob.f ├── prshd2.f ├── prtacf.f ├── prtadj.f ├── prtagr.f ├── prtamd.f ├── prtchi.f ├── prtcol.f ├── prtd8b.f ├── prtd9a.f ├── prtdft.f ├── prtdtb.f ├── prtdwr.f ├── prterr.f ├── prterx.f ├── prtf2.f ├── prtf2w.f ├── prtfct.f ├── prtft.f ├── prtitr.f ├── prtlog.f ├── prtmdl.f ├── prtmsp.f ├── prtmsr.f ├── prtmtx.f ├── prtnfn.f ├── prtopt.f ├── prtous.i ├── prtref.f ├── prtrev.f ├── prtrts.f ├── prtrv2.f ├── prtshd.f ├── prttbl.f ├── prttbl1.f ├── prttd.f ├── prttrn.f ├── prtukp.f ├── prtxrg.f ├── punch.f ├── putbak.f ├── putrev.f ├── putstr.f ├── qcmmnt.f ├── qcontr.f ├── qdoble.f ├── qintgr.f ├── qmap.f ├── qmap2.f ├── qname.f ├── qquote.f ├── qrfac.f ├── qrsolv.f ├── qsdiff.f ├── qtoken.f ├── quad.f ├── quadit.f ├── quadsd.f ├── ratneg.f ├── ratpos.f ├── rdotlr.f ├── rdotls.f ├── rdregm.f ├── realit.f ├── regfix.f ├── reglbl.f ├── regvar.f ├── regx11.f ├── replac.f ├── replyf.f ├── resid.f ├── resid2.f ├── restor.f ├── rev.cmn ├── rev.prm ├── revchk.f ├── revdrv.f ├── revhdr.f ├── revrse.f ├── revs.i ├── revsrs.cmn ├── revtbl.i ├── revtrg.cmn ├── revusr.cmn ├── rgarma.f ├── rgtdhl.f ├── rho.cmn ├── rho2.f ├── rmatot.f ├── rmfix.f ├── rmlnvr.f ├── rmlpyr.f ├── rmotrv.f ├── rmotss.f ├── rmpadj.f ├── rmtadj.f ├── rndsa.f ├── rngbuf.f ├── roots.f ├── round.f ├── rplus.f ├── rpoly.f ├── rtestm.i ├── rv2ss.f ├── rvarma.f ├── rvfixd.f ├── rvrghd.f ├── rvtdrg.f ├── sautco.f ├── savacf.f ├── savchi.f ├── savcmn.cmn ├── savd8b.f ├── savitr.f ├── savmdc.f ├── savmdl.f ├── savmtx.f ├── savotl.f ├── savpk.f ├── savspp.f ├── savstp.f ├── savtbl.f ├── savtpk.f ├── savwkf.f ├── sceast.f ├── scrmlt.f ├── sdev.f ├── sdxtrm.f ├── seastest.i ├── seatad.cmn ├── seatad.f ├── seatcm.cmn ├── seatdg.cmn ├── seatdg.f ├── seatfc.f ├── seatlg.cmn ├── seatmd.cmn ├── seatop.cmn ├── seatpr.f ├── seatserr.i ├── seattb.i ├── serates.f ├── series.cmn ├── sername.i ├── serrlev.i ├── sesfcast.i ├── setadj.f ├── setamx.f ├── setapt.f ├── setarg.f ├── setchr.f ├── setcv.f ├── setcvl.f ├── setdp.f ├── setint.f ├── setlg.f ├── setmdl.f ├── setmv.f ├── setopr.f ├── setpt.f ├── setrvp.f ├── setspn.f ├── setssp.f ├── setsvl.i ├── settab.prm ├── setup.f ├── setwrt.f ├── setxpt.f ├── sfcast.i ├── sfmax.f ├── sfmsr.f ├── sform.i ├── sftest.f ├── shlsrt.f ├── shrink.f ├── si.f ├── sicp2.f ├── sig.i ├── sig1.i ├── sigex.f ├── sigsub.f ├── simul.f ├── skparg.f ├── skparm.f ├── skpfcn.f ├── skplst.f ├── smeadl.f ├── smpeak.f ├── snrasp.f ├── spcdrv.f ├── spcidx.cmn ├── spcrsd.f ├── spcsvl.i ├── spctbl.i ├── spe.i ├── special.f ├── specpeak.f ├── spectra.i ├── spectrum.f ├── spectrum.i ├── spgrh.f ├── spgrh2.f ├── spmpar.f ├── srslen.i ├── srslen.prm ├── ss2rv.cmn ├── ss2rv.f ├── ssap.cmn ├── ssap.f ├── ssap.prm ├── ssfnot.f ├── ssft.cmn ├── ssftst.f ├── sshist.f ├── ssmdl.f ├── ssort.f ├── sspdat.cmn ├── sspdrv.f ├── ssphdr.f ├── sspinp.cmn ├── ssprep.cmn ├── ssprep.f ├── ssptbl.i ├── sspvec.cmn ├── ssrit.f ├── ssrng.f ├── ssx11a.f ├── ssxmdl.f ├── stable.prm ├── stable.var ├── stcfcm.cmn ├── stdio.i ├── stpitr.f ├── stream.i ├── strinx.f ├── strmodel.i ├── strtvl.f ├── stvaln.f ├── subset.f ├── sumf.f ├── sumry.f ├── sums.i ├── sumsqr.f ├── sumtab.prm ├── sumtab.var ├── svaict.f ├── svamcm.f ├── svchsd.f ├── svdttm.f ├── svf2f3.f ├── svflt.f ├── svfltd.f ├── svfnrg.f ├── svfreq.f ├── svllog.cmn ├── svllog.i ├── svllog.prm ├── svltbl.prm ├── svltbl.var ├── svolit.f ├── svoudg.f ├── svpeak.f ├── svrgcm.f ├── svrvhd.f ├── svspan.f ├── svtukp.f ├── table.f ├── table.prm ├── table.var ├── taper.f ├── tbl5x.i ├── tblhdr.f ├── tbllbl.prm ├── tbllbl.var ├── tbllog.cmn ├── tbllog.i ├── tbllog.prm ├── tbltitle.prm ├── td6var.f ├── td7var.f ├── tdaic.f ├── tdftest.f ├── tdlom.f ├── tdset.f ├── tdtyp.cmn ├── tdxtrm.f ├── templs.f ├── test.i ├── testf1.i ├── testodf.f ├── tests.cmn ├── tfmts.cmn ├── tfmts.f ├── tfmts.prm ├── tfmts.var ├── tfmts2.prm ├── tfmts2.var ├── tfmts3.f ├── titl.i ├── title.cmn ├── totals.f ├── transc.f ├── transcad.i ├── trbias.f ├── trnaic.f ├── trnfcn.f ├── tstdrv.f ├── tstmd1.f ├── tstmd2.f ├── ttest.f ├── tukey.cmn ├── uconv.f ├── unitmak.i ├── units.cmn ├── upespm.f ├── urgbak.cmn ├── usraic.f ├── usrreg.cmn ├── usrxrg.cmn ├── value.f ├── varian.f ├── varlog.f ├── vars.f ├── vsfa.f ├── vsfb.f ├── vsfc.f ├── vtc.f ├── vtest.f ├── weight.f ├── whitsp.f ├── work2.cmn ├── wr.f ├── writln.f ├── wrtdat.f ├── wrtmss.f ├── wrtotl.f ├── wrttb2.f ├── wrttbl.f ├── wtxtrm.f ├── x11adj.cmn ├── x11aic.f ├── x11ari.f ├── x11fac.cmn ├── x11int.f ├── x11log.cmn ├── x11mdl.f ├── x11msc.cmn ├── x11opt.cmn ├── x11plt.f ├── x11pt1.f ├── x11pt2.f ├── x11pt3.f ├── x11pt4.f ├── x11ptr.cmn ├── x11ref.f ├── x11reg.cmn ├── x11reg.prm ├── x11reg.var ├── x11srs.cmn ├── x11svl.i ├── x11tbl.i ├── x12hdr.f ├── x12run.f ├── xarr.i ├── xchng.f ├── xclude.cmn ├── xeastr.cmn ├── xpand.f ├── xprmx.f ├── xrgdiv.f ├── xrgdrv.f ├── xrgfct.cmn ├── xrghol.f ├── xrgmdl.cmn ├── xrgtbl.i ├── xrgtrn.f ├── xrgum.cmn ├── xrlkhd.f ├── xtdtyp.cmn ├── xtrm.cmn ├── xtrm.f ├── xxxs.i ├── yprmy.f └── yrly.f /.Rbuildignore: -------------------------------------------------------------------------------- 1 | ^\.travis\.yml$ 2 | ^appveyor\.yml$ 3 | ^inst/bin/x13as* 4 | .*\.tar\.gz$ 5 | ^\.github 6 | ^inst/tools* 7 | ^.*\.Rproj$ 8 | ^\.Rproj\.user$ 9 | ^\.github$ 10 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | data/* binary 3 | src/* text=lf 4 | R/* text=lf 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /inst/bin/x13ashtml* 2 | /inst/lib/* 3 | /tools/x13as_html/x13as_html 4 | .DS_Store 5 | -------------------------------------------------------------------------------- /DESCRIPTION: -------------------------------------------------------------------------------- 1 | Package: x13binary 2 | Type: Package 3 | Title: Provide the 'x13ashtml' Seasonal Adjustment Binary 4 | Version: 1.1.61 5 | Date: 2024-06-23 6 | Authors@R: c( 7 | person("Dirk", "Eddelbuettel", email = "edd@debian.org", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-6419-907X")), 8 | person("Christoph", "Sax", role = "aut", comment = c(ORCID = "0000-0002-7192-7044")), 9 | person("Kirill", "Müller", role = "ctb", comment = c(ORCID = "0000-0002-1416-3412")), 10 | person("Jeroen", "Ooms", role = "ctb", comment = c(ORCID = "0000-0002-4035-0289")), 11 | person("Michael", "Antonov", role = "ctb") 12 | ) 13 | Description: The US Census Bureau provides a seasonal adjustment program now 14 | called 'X-13ARIMA-SEATS' building on both earlier programs called X-11 and 15 | X-12 as well as the SEATS program by the Bank of Spain. The US Census Bureau 16 | offers both source and binary versions -- which this package integrates for 17 | use by other R packages. 18 | License: file LICENSE 19 | Copyright: file inst/COPYRIGHT 20 | URL: https://github.com/x13org/x13binary 21 | BugReports: https://github.com/x13org/x13binary/issues/ 22 | RoxygenNote: 7.2.3 23 | Encoding: UTF-8 24 | SystemRequirements: Fortran sources included in `tools/x13as_html` are compiled via `configure`. 25 | -------------------------------------------------------------------------------- /NAMESPACE: -------------------------------------------------------------------------------- 1 | # Generated by roxygen2: do not edit by hand 2 | 3 | export(checkX13binary) 4 | export(supportedPlatform) 5 | export(x13path) 6 | import(utils) 7 | -------------------------------------------------------------------------------- /R/init.R: -------------------------------------------------------------------------------- 1 | 2 | ## empty -- nothing to do here 3 | ## or maybe check for binary in expected location ? 4 | -------------------------------------------------------------------------------- /R/supportedPlatform.R: -------------------------------------------------------------------------------- 1 | #' Test Platform Support 2 | #' 3 | #' Always returns \code{TRUE}. 4 | #' 5 | #' @examples 6 | #' supportedPlatform() 7 | #' 8 | #' @export 9 | #' @import utils 10 | supportedPlatform <- function(){ 11 | TRUE 12 | } 13 | -------------------------------------------------------------------------------- /R/x13binary-package.R: -------------------------------------------------------------------------------- 1 | #' @title Provide the \sQuote{X13-ARIMA-SEATS} Seasonal Adjustment Program 2 | #' 3 | #' @description The US Census provides a seasonal adjustment program now called 4 | #' 'X-13ARIMA-SEATS' building on both earlier Census programs called X11 and 5 | #' X12 as well as the SEATS program by the Bank of Spain. Census offers both 6 | #' source and binary versions. This package integrates these for use by other R 7 | #' packages. 8 | #' 9 | #' @name x13binary-package 10 | #' @aliases x13binary 11 | #' @docType package 12 | #' @author Dirk Eddelbuettel \email{edd@@debian.org} and Christoph Sax 13 | #' @references \url{https://www.census.gov/data/software/x13as.X-13ARIMA-SEATS.html} 14 | #' @keywords package 15 | NULL 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /R/x13path.R: -------------------------------------------------------------------------------- 1 | #' Full Path to X-13ARIMA-SEATS 2 | #' 3 | #' Returns the full full path to the X-13ARIMA-SEATS binary contained in the 4 | #' package, or \code{""} if the platform is unsupported. 5 | #' 6 | #' @examples 7 | #' x13path() 8 | #' 9 | #' @export 10 | x13path <- function(){ 11 | system.file("bin", package="x13binary") 12 | } 13 | -------------------------------------------------------------------------------- /cleanup: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rm -f tools/x13as_html/*.o tools/x13as_html/x13as_html tools/x13as_html/x13as_html.exe \ 4 | inst/bin/x13as_html inst/bin/x13as_html.exe 5 | 6 | cd src && make clean 7 | -------------------------------------------------------------------------------- /inst/AUTHORS: -------------------------------------------------------------------------------- 1 | X-13ARIMA-SEATS Seasonal Adjustment Program 2 | Developed by the U.S. Census Bureau 3 | 4 | This R package uses Fortran code from the X-13ARIMA-SEATS Seasonal Adjustment Program. 5 | The version used is Version 1.1, Build 60, last updated in July 10, 2023, available at: https://www.census.gov/data/software/x13as.X-13ARIMA-SEATS.html 6 | 7 | U.S. Census Bureau 8 | 9 | The R Package was created by Dirk Eddelbuettel, Christoph Sax, Kirill Müller and Michael Antonov. 10 | -------------------------------------------------------------------------------- /inst/bin/README: -------------------------------------------------------------------------------- 1 | This directory, empty in the source distribution, will contain the binary 2 | compiled during installation. 3 | -------------------------------------------------------------------------------- /inst/testdata/Testairline.spc: -------------------------------------------------------------------------------- 1 | series{ 2 | title="International Airline Passengers Data from Box and Jenkins" 3 | start=1949.01 4 | data=( 5 | 112 118 132 129 121 135 148 148 136 119 104 118 6 | 115 126 141 135 125 149 170 170 158 133 114 140 7 | 145 150 178 163 172 178 199 199 184 162 146 166 8 | 171 180 193 181 183 218 230 242 209 191 172 194 9 | 196 196 236 235 229 243 264 272 237 211 180 201 10 | 204 188 235 227 234 264 302 293 259 229 203 229 11 | 242 233 267 269 270 315 364 347 312 274 237 278 12 | 284 277 317 313 318 374 413 405 355 306 271 306 13 | 315 301 356 348 355 422 465 467 404 347 305 336 14 | 340 318 362 348 363 435 491 505 404 359 310 337 15 | 360 342 406 396 420 472 548 559 463 407 362 405 16 | 417 391 419 461 472 535 622 606 508 461 390 432) 17 | span=(1952.01, ) 18 | } 19 | spectrum{ 20 | savelog=peaks 21 | } 22 | transform{ 23 | function=auto 24 | savelog=autotransform 25 | } 26 | regression{ 27 | aictest=(td easter) 28 | savelog=aictest 29 | } 30 | automdl{ 31 | savelog=automodel 32 | } 33 | outlier{ } 34 | x11{} 35 | 36 | 37 | -------------------------------------------------------------------------------- /inst/tools/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # (Minimal, SunOS etc compatible) Build script for x13asHTML 4 | # 5 | # Copyright (C) 2015 - 2021 Dirk Eddelbuettel 6 | # 7 | # Released under GPL (>= 2) 8 | 9 | set -e 10 | set -u 11 | 12 | srctgz="https://www2.census.gov/software/x-13arima-seats/x13as/unix-linux/program-archives/x13as_htmlsrc-v1-1-b57.tar.gz" 13 | file=`basename ${srctgz}` 14 | echo "${file}" 15 | 16 | cwd=`pwd` 17 | td=`mktemp -d -p /tmp x13dirXXXXXX` 18 | cd ${td} 19 | wget ${srctgz} 20 | ls -l ${file} 21 | gunzip -v ${file} 22 | tarfile=`basename ${file} .gz` 23 | ls -l ${tarfile} 24 | tar xvf ${tarfile} 25 | #ls 26 | #make -f makefile.gf 27 | #for f in *.f; do 28 | # gfortran -c -O1 ${f} 29 | #done 30 | #rm -f getarg.o gettim.o setarg.o 31 | #gfortran -static -o x13asHTML *.o -s -lm -lc 32 | gmake -f makefile.gf x13asHTMLsv11b57 33 | echo "" 34 | echo "Done in build directory ${td}" 35 | ls -l x13asHTMLsv11b57 36 | cd ${cwd} 37 | mv -v ${td}/x13asHTMLsv11b57 ../bin/x13ashtml 38 | rm -rf ${td} 39 | -------------------------------------------------------------------------------- /man/checkX13binary.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/checkX13binary.R 3 | \name{checkX13binary} 4 | \alias{checkX13binary} 5 | \title{Check if X-13ARIMA-SEATS Runs Properly} 6 | \usage{ 7 | checkX13binary(fail.unsupported = FALSE, verbose = TRUE) 8 | } 9 | \arguments{ 10 | \item{fail.unsupported}{logical, whether being on an unsupported platform 11 | leads to an error.} 12 | 13 | \item{verbose}{logical, should a message be returned on success?} 14 | } 15 | \description{ 16 | Performs a test run of X-13ARIMA-SEATS. Fails if no output is produced. 17 | } 18 | \examples{ 19 | checkX13binary() 20 | 21 | } 22 | -------------------------------------------------------------------------------- /man/supportedPlatform.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/supportedPlatform.R 3 | \name{supportedPlatform} 4 | \alias{supportedPlatform} 5 | \title{Test Platform Support} 6 | \usage{ 7 | supportedPlatform() 8 | } 9 | \description{ 10 | Always returns \code{TRUE}. 11 | } 12 | \examples{ 13 | supportedPlatform() 14 | 15 | } 16 | -------------------------------------------------------------------------------- /man/x13binary-package.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/x13binary-package.R 3 | \docType{package} 4 | \name{x13binary-package} 5 | \alias{x13binary-package} 6 | \alias{x13binary} 7 | \title{Provide the \sQuote{X13-ARIMA-SEATS} Seasonal Adjustment Program} 8 | \description{ 9 | The US Census provides a seasonal adjustment program now called 10 | 'X-13ARIMA-SEATS' building on both earlier Census programs called X11 and 11 | X12 as well as the SEATS program by the Bank of Spain. Census offers both 12 | source and binary versions. This package integrates these for use by other R 13 | packages. 14 | } 15 | \references{ 16 | \url{https://www.census.gov/data/software/x13as.X-13ARIMA-SEATS.html} 17 | } 18 | \author{ 19 | Dirk Eddelbuettel \email{edd@debian.org} and Christoph Sax 20 | } 21 | \keyword{package} 22 | -------------------------------------------------------------------------------- /man/x13path.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/x13path.R 3 | \name{x13path} 4 | \alias{x13path} 5 | \title{Full Path to X-13ARIMA-SEATS} 6 | \usage{ 7 | x13path() 8 | } 9 | \description{ 10 | Returns the full full path to the X-13ARIMA-SEATS binary contained in the 11 | package, or \code{""} if the platform is unsupported. 12 | } 13 | \examples{ 14 | x13path() 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | FC="$(FC)" FFLAGS="-O2" LINKER="$(FC)" $(MAKE) --directory=../tools/x13as_html -f makefile.gf x13ashtml 3 | mkdir -p ../inst/bin 4 | cp -f ../tools/x13as_html/x13ashtml ../inst/bin/ 5 | 6 | clean: 7 | @rm -f ../tools/x13as_html/x13ashtml 8 | -------------------------------------------------------------------------------- /src/Makefile.win: -------------------------------------------------------------------------------- 1 | all: 2 | FC="$(FC)" FFLAGS="-O2" LINKER="$(FC)" $(MAKE) --directory=../tools/x13as_html -f makefile.gf x13ashtml 3 | mkdir -p ../inst/bin 4 | cp -f ../tools/x13as_html/x13ashtml.exe ../inst/bin/ 5 | 6 | clean: 7 | rm -f ../tools/x13as_html/x13ashtml 8 | -------------------------------------------------------------------------------- /src/install.libs.R: -------------------------------------------------------------------------------- 1 | ## This file prevents R from looking for a shared library 2 | 3 | ## We use it here to (on macOS) update the dynamic library information of the just-created binary 4 | if (grepl("darwin", R.Version()$platform)) { 5 | links <- trimws(readLines(pipe("otool -L ../inst/bin/x13ashtml"))) 6 | for (lib in c("libgfortran", "libquadmath")) { 7 | libexpr <- paste0("/.*/", lib, ".*dylib") 8 | input <- unique(regmatches(links, regexpr(libexpr, links))) 9 | if (length(input)) { 10 | output <- file.path(R.home('lib'), basename(input)) 11 | if (file.exists(output)) { 12 | system2('install_name_tool', c('-change', input, output, "../inst/bin/x13ashtml")) 13 | } 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /tests/simpleTest.R: -------------------------------------------------------------------------------- 1 | 2 | library(x13binary) 3 | checkX13binary() 4 | -------------------------------------------------------------------------------- /tests/simpleTest.Rout.save: -------------------------------------------------------------------------------- 1 | 2 | R Under development (unstable) (2024-01-08 r85790) -- "Unsuffered Consequences" 3 | Copyright (C) 2024 The R Foundation for Statistical Computing 4 | Platform: x86_64-pc-linux-gnu 5 | 6 | R is free software and comes with ABSOLUTELY NO WARRANTY. 7 | You are welcome to redistribute it under certain conditions. 8 | Type 'license()' or 'licence()' for distribution details. 9 | 10 | R is a collaborative project with many contributors. 11 | Type 'contributors()' for more information and 12 | 'citation()' on how to cite R or R packages in publications. 13 | 14 | Type 'demo()' for some demos, 'help()' for on-line help, or 15 | 'help.start()' for an HTML browser interface to help. 16 | Type 'q()' to quit R. 17 | 18 | > 19 | > library(x13binary) 20 | > checkX13binary() 21 | x13binary is working properly 22 | > 23 | > proc.time() 24 | user system elapsed 25 | 0.410 0.028 0.431 26 | -------------------------------------------------------------------------------- /tools/x13as_html/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | -------------------------------------------------------------------------------- /tools/x13as_html/ac02ae.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /ac02ae/ ... 3 | logical SAT 4 | double precision X,Y0,R,RX,J,JX 5 | common /ac02ae/ X,Y0,R,RX,J,JX,SAT 6 | -------------------------------------------------------------------------------- /tools/x13as_html/acfptr.prm: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c LACF,LACP,LPCF, and LPCP are displacements from the 3 | c spec pointers so that prtacf can print the right combination 4 | c of acf's and plots whether they are for the identify or the check. 5 | c----------------------------------------------------------------------- 6 | INTEGER LACF, LACP, LPCF, LPCP 7 | PARAMETER (LACF=1, LACP=2, LPCF=3, LPCP=4) 8 | 9 | -------------------------------------------------------------------------------- /tools/x13as_html/acfst.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /acfst/ ... 3 | real*8 ACFPTH(0:24),ACFPER(0:mc),ACFPEM(0:24),ACFATH(0:24), 4 | $ ACFAER(0:mc),ACFAEM(0:24),ACFSTH(0:24),ACFSER(0:mc), 5 | $ ACFSEM(0:24),ACFCTH(0:24),ACFCER(0:mc),ACFCEM(0:24), 6 | $ ACFITH(0:24),ACFIER(0:mc),ACFIEM(0:24) 7 | common /acfst/ ACFPTH,ACFPER,ACFPEM,ACFATH,ACFAER,ACFAEM,ACFSTH, 8 | $ ACFSER,ACFSEM,ACFCTH,ACFCER,ACFCEM,ACFITH,ACFIER, 9 | $ ACFIEM 10 | -------------------------------------------------------------------------------- /tools/x13as_html/across.i: -------------------------------------------------------------------------------- 1 | C 2 | C Created by REG on 12 Aug 2005 3 | C 4 | C... Variables in Common Block /altcrosscov/ ... 5 | C Cross Covariance Estimates 6 | real*8 seaIrrEst, seaTreEst, treIrrEst 7 | C Cross Covariance Estimators 8 | real*8 seaIrrEso, seaTreEso, treIrrEso 9 | C Cross Covariance Variances 10 | real*8 seaIrrVar, seaTreVar, treIrrVar 11 | C Cross Covariance Diagnostics 12 | real*8 seaIrrDia, seaTreDia, treIrrDia 13 | C Cross Covariance Pvalues 14 | real*8 seaIrrDgP, seaTreDgP, treIrrDgP 15 | C Cross Covariance Classes: 'ok', '+ ', '- ', '++', '--' 16 | character*2 seaIrrDgC, seaTreDgC, treIrrDgC 17 | C The Cross Covariance common block 18 | common /altcrosscov/ 19 | & seaIrrEst, seaTreEst, treIrrEst, 20 | & seaIrrEso, seaTreEso, treIrrEso, 21 | & seaIrrVar, seaTreVar, treIrrVar, 22 | & seaIrrDia, seaTreDia, treIrrDia, 23 | & seaIrrDgP, seaTreDgP, treIrrDgP, 24 | & seaIrrDgC, seaTreDgC, treIrrDgC 25 | -------------------------------------------------------------------------------- /tools/x13as_html/addmul.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE addmul(Z,X,Y,Ib,Ie) 2 | IMPLICIT NONE 3 | C*** Start of declarations inserted by SPAG 4 | INCLUDE 'srslen.prm' 5 | INCLUDE 'x11opt.cmn' 6 | INTEGER i,Ib,Ie 7 | DOUBLE PRECISION X,Y,Z 8 | C*** End of declarations inserted by SPAG 9 | C --- THIS SUBROUTINE MULTIPLIES (ADDS) SERIES X TO Y AND STORES THE 10 | C --- RESULT IN Z. 11 | DIMENSION X(Ie),Y(Ie),Z(Ie) 12 | IF(Muladd.ne.0)THEN 13 | DO i=Ib,Ie 14 | Z(i)=X(i)+Y(i) 15 | END DO 16 | RETURN 17 | END IF 18 | DO i=Ib,Ie 19 | Z(i)=X(i)*Y(i) 20 | END DO 21 | RETURN 22 | END 23 | -------------------------------------------------------------------------------- /tools/x13as_html/addsub.f: -------------------------------------------------------------------------------- 1 | **==addsub.f processed by SPAG 6.05Fc at 12:31 on 12 Oct 2004 2 | 3 | 4 | SUBROUTINE ADD_SUB(A,B,C,N,M,Id,Ind) 5 | IMPLICIT NONE 6 | **--ADDSUB6 7 | C 8 | C*** Start of declarations rewritten by SPAG 9 | C 10 | C Dummy arguments 11 | C 12 | INTEGER Id,Ind,M,N 13 | REAL*8 A(Id,*),B(Id,*),C(Id,*) 14 | C 15 | C Local variables 16 | C 17 | INTEGER i,j 18 | C 19 | C*** End of declarations rewritten by SPAG 20 | C 21 | c **** Start of Executable Program 22 | C INTEGER*4 N,M,ID,IND 23 | 24 | DO i=1,N 25 | DO j=1,M 26 | IF (Ind.GT.0) THEN 27 | C(i,j)=A(i,j)+B(i,j) 28 | ELSE 29 | C(i,j)=A(i,j)-B(i,j) 30 | END IF 31 | END DO 32 | END DO 33 | END 34 | -------------------------------------------------------------------------------- /tools/x13as_html/adj.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c Adj : Prior adjustment factors 3 | c Adj1st : Position in the Adj vector that corresponds to the 4 | c beginning of the span 5 | c Adjmod : Mode of the prior adjustment factors in Adj 6 | c (0=differences converted to facter by exponentiation, 7 | c 1=factors,2=differences) 8 | c Nadj : Number user-defined prior adjustment factors 9 | c Begadj : Starting date for user-defined prior adjustment factors 10 | c Setpri : gives pointer for first observation in Sprior 11 | c----------------------------------------------------------------------- 12 | INTEGER Adj1st,Adjmod,Nadj,Begadj,Setpri 13 | DOUBLE PRECISION Adj,Cnstnt 14 | DIMENSION Adj(PLEN),Begadj(2) 15 | c----------------------------------------------------------------------- 16 | COMMON / adjcmn / Adj,Cnstnt,Adj1st,Nadj,Begadj,Setpri,Adjmod 17 | c----------------------------------------------------------------------- -------------------------------------------------------------------------------- /tools/x13as_html/adxser.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c Arrays containing different version of the X-11 seasonally 3 | c adjusted series. 4 | c----------------------------------------------------------------------- 5 | DOUBLE PRECISION Stome,Stcime,Stci2,Stcirn 6 | DIMENSION Stome(PLEN),Stcime(PLEN),Stci2(PLEN),Stcirn(PLEN) 7 | C DOUBLE PRECISION Stcipc,Srspc 8 | C DIMENSION Stcipc(PLEN),Srspc(PLEN) 9 | c----------------------------------------------------------------------- 10 | COMMON /adxser/ Stome,Stcime,Stci2,Stcirn 11 | -------------------------------------------------------------------------------- /tools/x13as_html/agr.cmn: -------------------------------------------------------------------------------- 1 | C----------------------------------------------------------------------- 2 | C Variables needed for composite seasonal adjustment 3 | C----------------------------------------------------------------------- 4 | c Iagr - indicator variable for composite adjustment 5 | c Iag - indicator variable for type of compositing 6 | c (0=add, 1=sub, 2=mult, 3=div) 7 | c Itest - vector used to check composite series 8 | c W - weight used in composite adjustment 9 | C----------------------------------------------------------------------- 10 | DOUBLE PRECISION W 11 | LOGICAL LindAO,LindLS,LindCl,Lindot 12 | INTEGER Iagr,Itest,Ncomp,Indnfc,Indnbc,Iag,Ind1bk,Ind1ob,Indfob, 13 | & Indffc,Ibgbk,Ibgbk2,Dirnfc,Dirnbc 14 | DIMENSION Itest(5),Ibgbk(2),Ibgbk2(2) 15 | C----------------------------------------------------------------------- 16 | COMMON /mq11 / W,Iagr,Iag,Itest,Ncomp,Indnfc,Indnbc,Ind1bk, 17 | & Ind1ob,Indfob,Indffc,Ibgbk,Ibgbk2,Dirnfc,Dirnbc, 18 | & LindAO,LindLS,LindCl,Lindot 19 | -------------------------------------------------------------------------------- /tools/x13as_html/agr.f: -------------------------------------------------------------------------------- 1 | C Last change: BCM 21 Nov 97 9:53 pm 2 | **==agr.f processed by SPAG 4.03F at 09:46 on 1 Mar 1994 3 | SUBROUTINE agr(A,B,Iag,J1,J2,J0,Wt) 4 | IMPLICIT NONE 5 | C*** Start of declarations inserted by SPAG 6 | DOUBLE PRECISION A,B,Wt 7 | INTEGER i,Iag,J1,J2,J0,j 8 | C*** End of declarations inserted by SPAG 9 | INCLUDE 'srslen.prm' 10 | C THIS SUBROUTINE COMPOSITES THE COMPONENT SERIES 11 | DIMENSION A(PLEN),B(PLEN) 12 | c----------------------------------------------------------------------- 13 | LOGICAL dpeq 14 | EXTERNAL dpeq 15 | c----------------------------------------------------------------------- 16 | IF(dpeq(Wt,0.D0))Wt=1.D0 17 | DO i=J1,J2 18 | j=i+J0-J1 19 | IF(Iag.eq.0)B(j)=B(j)+(A(i)*Wt) 20 | IF(Iag.eq.1)B(j)=B(j)-(A(i)*Wt) 21 | IF(Iag.eq.2)B(j)=B(j)*(A(i)*Wt) 22 | IF(Iag.eq.3)B(j)=B(j)/(A(i)*Wt) 23 | END DO 24 | RETURN 25 | END 26 | -------------------------------------------------------------------------------- /tools/x13as_html/amic.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /amic/ ... 3 | integer MODELS(28) 4 | real*8 STATISTICS(8) 5 | common /amic/ MODELS,STATISTICS 6 | -------------------------------------------------------------------------------- /tools/x13as_html/analts.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x13org/x13binary/c7d0198181c9f09353da0136f5c18da6b0d40999/tools/x13as_html/analts.f -------------------------------------------------------------------------------- /tools/x13as_html/ansub1.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x13org/x13binary/c7d0198181c9f09353da0136f5c18da6b0d40999/tools/x13as_html/ansub1.f -------------------------------------------------------------------------------- /tools/x13as_html/ansub10.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x13org/x13binary/c7d0198181c9f09353da0136f5c18da6b0d40999/tools/x13as_html/ansub10.f -------------------------------------------------------------------------------- /tools/x13as_html/ansub2.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x13org/x13binary/c7d0198181c9f09353da0136f5c18da6b0d40999/tools/x13as_html/ansub2.f -------------------------------------------------------------------------------- /tools/x13as_html/ansub5.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x13org/x13binary/c7d0198181c9f09353da0136f5c18da6b0d40999/tools/x13as_html/ansub5.f -------------------------------------------------------------------------------- /tools/x13as_html/antilg.f: -------------------------------------------------------------------------------- 1 | C Last change: BCM 27 Apr 1998 7:27 am 2 | SUBROUTINE antilg(X,I,J) 3 | IMPLICIT NONE 4 | c----------------------------------------------------------------------- 5 | INTEGER I,J,k 6 | DOUBLE PRECISION tmp,X 7 | DIMENSION X(J) 8 | c----------------------------------------------------------------------- 9 | DO k=I,J 10 | tmp=X(k) 11 | X(k)=exp(tmp) 12 | END DO 13 | c----------------------------------------------------------------------- 14 | RETURN 15 | END 16 | -------------------------------------------------------------------------------- /tools/x13as_html/apply.f: -------------------------------------------------------------------------------- 1 | **==apply.f processed by SPAG 4.03F at 09:46 on 1 Mar 1994 2 | DOUBLE PRECISION FUNCTION apply(X,K,W,N) 3 | IMPLICIT NONE 4 | C*** Start of declarations inserted by SPAG 5 | DOUBLE PRECISION W,X 6 | INTEGER i,j,K,l,m,N 7 | C*** End of declarations inserted by SPAG 8 | C 9 | C THIS FUNCTION APPLIES SYMMETRIC WEIGHTS TO X(K) 10 | C 11 | DIMENSION X(*),W(*) 12 | m=(N+1)/2 13 | apply=W(1)*X(K) 14 | DO i=2,m 15 | j=K-i+1 16 | l=K+i-1 17 | apply=apply+W(i)*(X(j)+X(l)) 18 | END DO 19 | RETURN 20 | END 21 | 22 | -------------------------------------------------------------------------------- /tools/x13as_html/autoq.cmn: -------------------------------------------------------------------------------- 1 | C Last change: BCM 5 Apr 2005 1:45 pm 2 | c----------------------------------------------------------------------- 3 | INTEGER Dgf 4 | DOUBLE PRECISION C0,Qs,Qpv 5 | DIMENSION Dgf(PR),Qs(PR),Qpv(PR) 6 | c----------------------------------------------------------------------- 7 | COMMON /autoq / C0,Qs,Qpv,Dgf 8 | c----------------------------------------------------------------------- 9 | -------------------------------------------------------------------------------- /tools/x13as_html/averag.f: -------------------------------------------------------------------------------- 1 | **==averag.f processed by SPAG 4.03F at 09:47 on 1 Mar 1994 2 | SUBROUTINE averag(X,Y,Ib,Ie,M,N) 3 | IMPLICIT NONE 4 | C*** Start of declarations inserted by SPAG 5 | DOUBLE PRECISION fmn,tmp,X,Y 6 | INTEGER i,i1,i2,Ib,Ie,j,ji,k,kb,ke,ki,M,N 7 | C*** End of declarations inserted by SPAG 8 | C 9 | C --- THIS SUBROUTINE APPLIES AN M-OF-N MOVING AVERAGE TO THE SERIES 10 | C --- X AND STORES THE RESULTS IN Y. 11 | C 12 | DIMENSION X(Ie),Y(Ie) 13 | ki=(M+N)/2-1 14 | kb=Ib+ki 15 | ke=Ie-ki 16 | IF(ke.ge.kb)THEN 17 | fmn=dble(M*N) 18 | DO k=kb,ke 19 | tmp=0D0 20 | i1=k-ki 21 | i2=i1+M-1 22 | DO i=i1,i2 23 | ji=i+N-1 24 | DO j=i,ji 25 | tmp=tmp+X(j) 26 | END DO 27 | END DO 28 | Y(k)=tmp/fmn 29 | END DO 30 | END IF 31 | RETURN 32 | END 33 | -------------------------------------------------------------------------------- /tools/x13as_html/bartlett.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /bartlett SE/ ... 3 | real*8 bsetr(0:kp),bses(0:kp),bsesa(0:kp),bsecyc(0:kp), 4 | $ bseir(0:kp) 5 | common /bartlett/ bsetr,bses,bsesa,bsecyc,bseir 6 | -------------------------------------------------------------------------------- /tools/x13as_html/bench.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /bench/ ... 3 | real*8 brol,blamda 4 | integer bserie,bmid,bcMark 5 | common /bench/ brol,blamda,bserie,bmid,bcMark 6 | 7 | -------------------------------------------------------------------------------- /tools/x13as_html/bstmdl.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c Model variables for the "best" model found by the automatic model 3 | c selection procedure 4 | c----------------------------------------------------------------------- 5 | LOGICAL Bstsdf,Bstafx 6 | DOUBLE PRECISION Bstap,Bstb 7 | INTEGER Bstalg,Bstm,Bsto,Bstofc,Bstopt,Bstno,Bstnot,Bstnm, 8 | & Bnsedf,Bseadf,Bstngr,Bsngrt,Bsncxy,Bstnb,Bstnct,Bclptr, 9 | & Bstgrp,Bsgptr,Bstrgv 10 | CHARACTER Bstctl*(PCOLCR*PB),Bstgtl*(PGRPCR*PGRP), 11 | & Bstot*(POPRCR*POPR) 12 | c----------------------------------------------------------------------- 13 | DIMENSION Bstap(PARIMA),Bstb(PB),Bstafx(PARIMA),Bstalg(PARIMA), 14 | & Bstm(0:3*PMDL),Bsto(0:POPR),Bstofc(POPR),Bstopt(0:POPR), 15 | & Bclptr(0:PB),Bstgrp(0:PGRP),Bsgptr(0:PGRP),Bstrgv(PB) 16 | c----------------------------------------------------------------------- 17 | COMMON /bstcmn/ Bstap,Bstb,Bstalg,Bstm,Bsto,Bstofc,Bstopt,Bstno, 18 | & Bstnot,Bstnm,Bnsedf,Bseadf,Bstngr,Bsngrt,Bsncxy, 19 | & Bstnb,Bstnct,Bclptr,Bstgrp,Bsgptr,Bstrgv,Bstsdf, 20 | & Bstafx,Bstctl,Bstgtl,Bstot 21 | -------------------------------------------------------------------------------- /tools/x13as_html/buffers.i: -------------------------------------------------------------------------------- 1 | C... 2 | character buffS*80 3 | common /bufferS/ buffS -------------------------------------------------------------------------------- /tools/x13as_html/build.comp.i: -------------------------------------------------------------------------------- 1 | character Revision*4 2 | character Build*19 3 | character compdate*100 4 | Revision='341' 5 | Build='2010/04/29 15:58:30' 6 | compdate='Revision: '//Revision//' Build: ' // Build 7 | -------------------------------------------------------------------------------- /tools/x13as_html/build.i: -------------------------------------------------------------------------------- 1 | character Revision*4 2 | character Build*19 3 | character compdate*100 4 | Revision='657' 5 | Build='2012/11/28 12:09:23' 6 | compdate='Revision: '//Revision//' Build: ' // Build 7 | -------------------------------------------------------------------------------- /tools/x13as_html/build.prm: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c Contains text with build number for current working version of 3 | c X-12-ARIMA 4 | c!---------------------------------------------------------------------- 5 | CHARACTER*2 BUILD 6 | parameter (BUILD='60') 7 | c!---------------------------------------------------------------------- 8 | -------------------------------------------------------------------------------- /tools/x13as_html/calc.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /calc/ ... 3 | integer TYPE,P,D,Q,BP,BD,BQ,PBP,PQ,NW,INIT,BPQ,IMEAN,IPR 4 | real*8 DETPRI 5 | real*8 Wd(MPKP),PHI(3*N1),TH(3*N1),BPHI(3*N1),BTH(3*N1), 6 | $ PHIST(2*N12+3*N1),THSTAR(40) 7 | common /calc/ Wd,PHI,TH,BPHI,BTH,PHIST,THSTAR,DETPRI,TYPE,P,D,Q, 8 | $ BP,BD,BQ,PBP,PQ,NW,INIT,BPQ,IMEAN,IPR 9 | -------------------------------------------------------------------------------- /tools/x13as_html/calfor.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /calfor/ ... 3 | integer PSTAR,QSTAR,MQ 4 | common /calfor/ PSTAR,QSTAR,MQ 5 | -------------------------------------------------------------------------------- /tools/x13as_html/calshr.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /calshr/ ... 3 | integer IFAC 4 | common /calshr/ IFAC 5 | -------------------------------------------------------------------------------- /tools/x13as_html/cchars.i: -------------------------------------------------------------------------------- 1 | CHARACTER*1 CHREOF,NEWLIN,TABCHR 2 | COMMON /cchars/ CHREOF,NEWLIN,TABCHR 3 | -------------------------------------------------------------------------------- /tools/x13as_html/ceilng.f: -------------------------------------------------------------------------------- 1 | C Last change: BCM 24 Aug 2001 11:38 am 2 | C JK 4 Mar 2009 4:43 pm STATCAN 3 | DOUBLE PRECISION FUNCTION ceilng(X) 4 | IMPLICIT NONE 5 | c ------------------------------------------------------------------- 6 | DOUBLE PRECISION X 7 | INTEGER*8 y 8 | c ------------------------------------------------------------------- 9 | y=X 10 | ceilng=dble(y) 11 | IF(X.gt.ceilng)ceilng=ceilng+1 12 | c ------------------------------------------------------------------- 13 | RETURN 14 | END 15 | -------------------------------------------------------------------------------- /tools/x13as_html/chkcvr.f: -------------------------------------------------------------------------------- 1 | LOGICAL FUNCTION chkcvr(Begsrs,Nobs,Begspn,Nspobs,Sp) 2 | IMPLICIT NONE 3 | c----------------------------------------------------------------------- 4 | c chkcvr.f, Release 1, Subroutine Version 1.4, Modified 30 Nov 1994. 5 | c----------------------------------------------------------------------- 6 | c Check whether the span (begspn,nspobs) is covered by the 7 | c series (begsrs,nobs). Returns true if the span is covered. 8 | c----------------------------------------------------------------------- 9 | INTEGER Begspn,Begsrs,idif,Nobs,Nspobs,Sp 10 | DIMENSION Begspn(2),Begsrs(2) 11 | c ------------------------------------------------------------------ 12 | chkcvr=.true. 13 | CALL dfdate(Begspn,Begsrs,Sp,idif) 14 | IF(idif.lt.0.or.idif+Nspobs.gt.Nobs.or.Nspobs.le.0)chkcvr=.false. 15 | c ------------------------------------------------------------------ 16 | RETURN 17 | END 18 | -------------------------------------------------------------------------------- /tools/x13as_html/chrt.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | CHARACTER I1*1,I3*1,I4*1,I7*1,I8*1,I9*1,I10*1,I11*1,I12*1,Ia*1, 3 | & Ip*1,Ialpha*1,Ialphq*1 4 | INTEGER Ibeg2,Ienda,Ixy,Nseas,Nyr,Npts,N1,Ifrst,Last,Llyr,Lastyr, 5 | & Imid,Icmax,Iyear,Inyr,Ibottm,Ifact2 6 | DOUBLE PRECISION Ab1,Ser1,Xdata3,Xyvec,Y1,Y2,Ydiff,Ymax,Ymin,Ymid, 7 | & Fact1 8 | DIMENSION Y1(PLEN),Y2(PLEN),Xdata3(61),Ia(110,55),Ip(10),Ymid(14), 9 | & Imid(14),Ialpha(12),Ialphq(4),Ser1(61,12),Ab1(61), 10 | & Iyear(61) 11 | c----------------------------------------------------------------------- 12 | COMMON /chrtcr / Ia,Ialpha,Ip,Ialphq,I1,I3,I4,I7,I8,I9,I10,I11,I12 13 | COMMON /chrtdp / Ab1,Fact1,Ser1,Xyvec,Y1,Y2,Xdata3,Ymin,Ymax, 14 | & Ydiff,Ymid 15 | COMMON /chrtin / Nyr,Npts,N1,Ifrst,Last,Llyr,Lastyr,Nseas,Ixy, 16 | & Ibeg2,Ienda,Iyear,Inyr,Icmax,Ibottm,Imid,Ifact2 17 | -------------------------------------------------------------------------------- /tools/x13as_html/clrotl.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE clrotl(Nrxy) 2 | IMPLICIT NONE 3 | c----------------------------------------------------------------------- 4 | c Remove automatically identified outlier regressors from model 5 | c This routine is done before redoing automatic outlier 6 | c identification in the automatic model identification procedure 7 | c (BCM April 2007) 8 | c----------------------------------------------------------------------- 9 | INCLUDE 'srslen.prm' 10 | INCLUDE 'model.prm' 11 | INCLUDE 'model.cmn' 12 | INCLUDE 'error.cmn' 13 | c----------------------------------------------------------------------- 14 | INTEGER icol,Nrxy 15 | c----------------------------------------------------------------------- 16 | icol=Nb 17 | DO WHILE (icol.ge.1) 18 | IF(Rgvrtp(icol).eq.PRGTAA.or.Rgvrtp(icol).eq.PRGTAL.or. 19 | * & Rgvrtp(icol).eq.PRGTAT.or.Rgvrtp(icol).eq.PRGTAS)THEN 20 | & Rgvrtp(icol).eq.PRGTAT)THEN 21 | CALL dlrgef(icol,Nrxy,1) 22 | IF(Lfatal)RETURN 23 | END IF 24 | icol=icol-1 25 | END DO 26 | Natotl=0 27 | c----------------------------------------------------------------------- 28 | RETURN 29 | END 30 | -------------------------------------------------------------------------------- /tools/x13as_html/clsgrp.f: -------------------------------------------------------------------------------- 1 | **==clsgrp.f processed by SPAG 4.03F at 09:47 on 1 Mar 1994 2 | INTEGER FUNCTION clsgrp(Opnchr) 3 | IMPLICIT NONE 4 | c---------------------------------------------------------------------- 5 | c Return the ascii value of the closing character given the 6 | c opening character, i.e. ) for (,] for [, and { for }. 7 | c---------------------------------------------------------------------- 8 | INTEGER Opnchr 9 | c ----------------------------------------------------------------- 10 | IF(Opnchr.eq.40)THEN 11 | clsgrp=41 12 | c ----------------------------------------------------------------- 13 | ELSE IF(Opnchr.eq.47)THEN 14 | clsgrp=47 15 | c ----------------------------------------------------------------- 16 | ELSE IF(Opnchr.eq.91)THEN 17 | clsgrp=93 18 | c ----------------------------------------------------------------- 19 | ELSE IF(Opnchr.eq.123)THEN 20 | clsgrp=125 21 | c ----------------------------------------------------------------- 22 | ELSE 23 | clsgrp=-1 24 | END IF 25 | c ----------------------------------------------------------------- 26 | RETURN 27 | END 28 | -------------------------------------------------------------------------------- /tools/x13as_html/cmpflts.i: -------------------------------------------------------------------------------- 1 | C 2 | C component filters common block 3 | C 4 | C filters: column 1 = symmetric, column 2 = concurrent 5 | C size of filters is the same as size of data. 6 | DOUBLE PRECISION treFlt(1200,2), SAFlt(1200,2) 7 | C cycles/period set - all 1200 entries used. 8 | DOUBLE PRECISION fltW(0:1200) 9 | C for each filter: squared-gain, time-shift = - phase-delays; 10 | C all 1200 entries used. 11 | DOUBLE PRECISION treGain(0:1200,2), treTmShf(0:1200,2) 12 | DOUBLE PRECISION SAGain(0:1200,2), SATmShf(0:1200,2) 13 | C concurrent filter zero (at some frequency): 1 for SA, 2 for trend 14 | logical concFltZ(2), 15 | C Does each quantity exist. for each filter, squared-gain, phase-delays 16 | C column 1 = symmetric, column 2 = concurrent 17 | & ltreFlt(2), ltreGain(2), ltreTmShf(2), 18 | & lSAFlt(2), lSAGain(2), lSATmShf(2) 19 | common / cmpflts / fltW, 20 | & treFlt, treGain, treTmShf, 21 | & SAFlt, SAGain, SATmShf 22 | common / lcmpflt / concFltZ, 23 | & ltreFlt, ltreGain, ltreTmShf, 24 | & lSAFlt, lSAGain, lSATmShf 25 | -------------------------------------------------------------------------------- /tools/x13as_html/cmpsvl.i: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c Table pointer variables used for svltbl are of the form LSL 3 | c where the types are 4 | c----------------------------------------------------------------------- 5 | c ind M1 M1 6 | c ind Q Q 7 | c ind Q without M2 Q2 8 | c ind Moving seasonality ratio MSR 9 | c ind I/C Ratio ICR 10 | c ind F-test for stable seasonality, D8 FD8 11 | c ind F-test for moving seasonality, D8 MSF 12 | c test for aggregation smoothness ITT 13 | c----------------------------------------------------------------------- 14 | INTEGER LSLIM1,LSLISR,LSLIIR,LSLID8,LSLISF,LSLIID,LSLITT,LSLALI 15 | PARAMETER( 16 | & LSLIM1= 75,LSLISR= 88,LSLIIR= 89,LSLID8= 90,LSLISF= 91, 17 | & LSLIID= 92,LSLITT= 93,LSLALI= 94) 18 | -------------------------------------------------------------------------------- /tools/x13as_html/cogreg.prm: -------------------------------------------------------------------------------- 1 | CHARACTER COGDIC*130 2 | INTEGER cogptr,PCOG 3 | PARAMETER(PCOG=9) 4 | DIMENSION cogptr(0:PCOG) 5 | PARAMETER(COGDIC='seasonaltrigonometric seasonaltrading daylength- 6 | &of-monthlength-of-quarterleap yearstock trading daystock length-of 7 | &-monthregression') 8 | -------------------------------------------------------------------------------- /tools/x13as_html/cogreg.var: -------------------------------------------------------------------------------- 1 | DATA cogptr / 1,9,31,42,57,74,83,100,121,131 / 2 | -------------------------------------------------------------------------------- /tools/x13as_html/component.i: -------------------------------------------------------------------------------- 1 | c File Component.i 2 | integer MaxComp,MaxCompDim 3 | parameter(MaxComp=5,MaxCompDim=59) -------------------------------------------------------------------------------- /tools/x13as_html/cornom.f: -------------------------------------------------------------------------------- 1 | **==cornom.f processed by SPAG 4.03F at 09:47 on 1 Mar 1994 2 | SUBROUTINE cornom(C,Cn,Lagh1,Cx0,Cy0) 3 | IMPLICIT NONE 4 | C*** Start of declarations inserted by SPAG 5 | DOUBLE PRECISION C,Cn,cst1,Cx0,Cy0,ds 6 | INTEGER i,Lagh1 7 | C*** End of declarations inserted by SPAG 8 | C COMMON SUBROUTINE 9 | C NORMALIZATION OF COVARIANCE 10 | DIMENSION C(*),Cn(*) 11 | cst1=1.0D-00 12 | ds=cst1/sqrt(Cx0*Cy0) 13 | DO i=1,Lagh1 14 | Cn(i)=C(i)*ds 15 | END DO 16 | RETURN 17 | END 18 | -------------------------------------------------------------------------------- /tools/x13as_html/count.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /count/ ... 3 | integer IFN,JFAC,ICOMM 4 | common /count/ IFN,JFAC,ICOMM 5 | -------------------------------------------------------------------------------- /tools/x13as_html/crosco.f: -------------------------------------------------------------------------------- 1 | **==crosco.f processed by SPAG 4.03F at 09:47 on 1 Mar 1994 2 | SUBROUTINE crosco(X,Y,N1,N2,N,C,Lagh1) 3 | IMPLICIT NONE 4 | C*** Start of declarations inserted by SPAG 5 | DOUBLE PRECISION t,an,bn,bn1,C,ct0,X,Y 6 | INTEGER i,ii,il,j,j1,Lagh1,N,N1,N2 7 | C*** End of declarations inserted by SPAG 8 | C COMMON SUBROUTINE 9 | C THIS SUBROUTINE COMPUTES C(L)=COVARIANCE(X(S+L),Y(S)) 10 | C (L=0,1,...,LAGH1-1). 11 | DIMENSION X(*),Y(*),C(*) 12 | an=dble(N) 13 | bn1=1.0D-00 14 | bn=bn1/an 15 | ct0=0.0D-00 16 | DO ii=1,Lagh1 17 | i=ii-1 18 | t=ct0 19 | il=N2-i 20 | DO j=N1,il 21 | j1=j+i 22 | t=t+X(j1)*Y(j) 23 | END DO 24 | C(ii)=t*bn 25 | END DO 26 | RETURN 27 | END 28 | -------------------------------------------------------------------------------- /tools/x13as_html/cross.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /Crosscorr/ ... 3 | real*8 crciem(-mc:mc),crcier(-mc:mc),crpcem(-mc:mc), 4 | $ crpcer(-mc:mc),crpiem(-mc:mc),crpier(-mc:mc), 5 | $ crpsem(-mc:mc),crpser(-mc:mc),crscem(-mc:mc), 6 | $ crscer(-mc:mc),crsiem(-mc:mc),crsier(-mc:mc) 7 | common /crosscorr/ crciem,crcier,crpcem,crpcer,crpiem,crpier, 8 | $ crpsem,crpser,crscem,crscer,crsiem,crsier 9 | -------------------------------------------------------------------------------- /tools/x13as_html/cse.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /cse/ ... 3 | real*8 FFC 4 | real*8 PS(5*N12+N12/3) 5 | common /cse/ PS,FFC 6 | -------------------------------------------------------------------------------- /tools/x13as_html/cvdttm.f: -------------------------------------------------------------------------------- 1 | CHARACTER*24 FUNCTION cvdttm(datstr) 2 | IMPLICIT NONE 3 | c----------------------------------------------------------------------- 4 | c Function to convert Lahey fortran (PC) date and time convention 5 | c to a common format for date and time information 6 | c----------------------------------------------------------------------- 7 | CHARACTER datstr*24,cmonth*3,cm*3 8 | INTEGER d,y,h,minute,s 9 | INTEGER mon 10 | DIMENSION cmonth(12) 11 | DATA cmonth/'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep', 12 | & 'Oct','Nov','Dec'/ 13 | c write(*,*)'*',datstr,'*' 14 | if(datstr(3:3).eq.'/')THEN 15 | READ(datstr,1010)mon,d,y,h,minute,s 16 | 1010 FORMAT(6(i2,1x)) 17 | WRITE(cvdttm,1020)cmonth(mon),d,y+2000,h,minute,s 18 | ELSE 19 | READ(datstr,1011)cm,d,h,minute,s,y 20 | 1011 FORMAT(4x,a3,4(1x,i2),1x,i4) 21 | WRITE(cvdttm,1020)cm,d,y,h,minute,s 22 | END IF 23 | 1020 FORMAT(1x,a3,1x,i2,', ',i4,2x,2(i2.2,'.'),i2.2,1x) 24 | RETURN 25 | END 26 | c Jan 30, 2003 11.56.55 27 | -------------------------------------------------------------------------------- /tools/x13as_html/cxfinal.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /crossfinal/ ... 3 | real*8 CRSSA,CRTSA,CRTS,CRIRSA,CRIRS,CRIRT,CRCYCSA,CRCYCS,CRCYCT, 4 | $ CRCYCIR 5 | common /crossfinal/ CRSSA,CRTSA,CRTS,CRIRSA,CRIRS,CRIRT,CRCYCSA, 6 | $ CRCYCS,CRCYCT,CRCYCIR 7 | -------------------------------------------------------------------------------- /tools/x13as_html/date.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /date/ ... 3 | integer Dperiod,Dyear,Dfreq,Dlen,Olen 4 | character*7 ODate 5 | common /date/ Dperiod,Dyear,Dfreq,Dlen,Olen,Odate 6 | 7 | -------------------------------------------------------------------------------- /tools/x13as_html/decibl.f: -------------------------------------------------------------------------------- 1 | C Last change: BCM 5 Mar 2008 2:38 pm 2 | DOUBLE PRECISION FUNCTION decibl(X) 3 | IMPLICIT NONE 4 | c----------------------------------------------------------------------- 5 | c Convert X into decibels, use with spectral routines 6 | c----------------------------------------------------------------------- 7 | DOUBLE PRECISION X 8 | c----------------------------------------------------------------------- 9 | decibl=10D0*log10(X) 10 | RETURN 11 | END -------------------------------------------------------------------------------- /tools/x13as_html/deftab.prm: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c deftab - logical variable which defines those tables to be printed 3 | c in a default X-13 run 4 | c DATA statement that defines deftab is in deftab.var 5 | c----------------------------------------------------------------------- 6 | LOGICAL deftab 7 | DIMENSION deftab(NTBL) 8 | -------------------------------------------------------------------------------- /tools/x13as_html/desadj.var: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c pointers for descriptions of series and output dealing with 3 | c special X-11 and pre-adjustments. See desadj.prm for data dictionaries. 4 | c----------------------------------------------------------------------- 5 | DATA dsaptr / 6 | & 1, 31, 57, 84, 156, 184, 220, 243, 267, 335, 7 | & 397, 397, 413, 457, 475, 498, 522, 522, 568, 568, 8 | & 634, 680, 723, 769, 801, 818, 843, 888, 918, 954, 9 | & 1012,1052,1117,1220,1267,1352,1435,1513,1577 / 10 | -------------------------------------------------------------------------------- /tools/x13as_html/descm2.var: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c pointers for descriptions of series and output dealing with 3 | c composite seasonal adjustment. See descm2.prm for data dictionaries. 4 | c----------------------------------------------------------------------- 5 | DATA dc2ptr / 6 | & 1, 43, 70, 125, 172, 195, 219, 219, 286, 335, 7 | & 351, 426, 473, 516, 571, 612, 667, 701, 741, 785, 8 | & 812, 848, 929,1012,1090,1163 / 9 | -------------------------------------------------------------------------------- /tools/x13as_html/descmp.var: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c pointers for descriptions of series and output dealing with 3 | c composite seasonal adjustment. See descmp.prm for data dictionaries. 4 | c----------------------------------------------------------------------- 5 | DATA dscptr / 6 | & 1, 51, 80, 113, 146, 187, 227, 275, 307, 339, 7 | & 403, 430, 502, 536, 569, 589, 617, 690, 750, 821, 8 | & 887, 910, 971,1013,1093,1161,1267,1317,1405,1436, 9 | & 1505,1555,1643,1707,1739,1772 / 10 | -------------------------------------------------------------------------------- /tools/x13as_html/desdg2.prm: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c data dictionary for descriptions of series and output dealing with 3 | c sliding spans analysis. See desdg2.var for pointers. 4 | c----------------------------------------------------------------------- 5 | CHARACTER DD2DIC*518 6 | INTEGER dd2ptr 7 | DIMENSION dd2ptr(0:PDD2) 8 | c----------------------------------------------------------------------- 9 | PARAMETER(DD2DIC='sliding spans of the seasonal factorssliding spa 10 | &ns of the indirect seasonal factorssliding spans of the changes in 11 | & the seasonally adjusted seriessliding spans of the changes in the 12 | & indirect seasonally adjusted seriessliding spans of the seasonall 13 | &y adjusted seriessliding spans of the indirect seasonally adjusted 14 | & seriessliding spans of the year-to-year changes in the seasonally 15 | & adjusted seriessliding spans of the year-to-year changes in the i 16 | &ndirect seasonally adjusted seriessliding spans of the trading day 17 | & factors') 18 | -------------------------------------------------------------------------------- /tools/x13as_html/desdg2.var: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c pointers for descriptions of series and output dealing with 3 | c sliding spans analysis. See desdg2.prm for data dictionaries. 4 | c----------------------------------------------------------------------- 5 | DATA dd2ptr / 6 | & 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7 | & 1, 1, 1, 38, 84, 146, 217, 264, 320, 395, 8 | & 479, 519 / 9 | -------------------------------------------------------------------------------- /tools/x13as_html/desdgn.var: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c pointers for descriptions of series and output dealing with 3 | c revisions histories. See desdgn.prm for data dictionaries. 4 | c----------------------------------------------------------------------- 5 | DATA dsdptr / 6 | & 1, 27, 70, 118, 174, 257, 314, 359, 434, 469, 7 | & 534, 637, 703, 766, 860, 925, 977,1060,1102,1162, 8 | & 1268,1339,1384,1431,1466,1491,1516,1546,1577 / 9 | -------------------------------------------------------------------------------- /tools/x13as_html/desfc2.var: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c pointers for descriptions of series and output dealing with 3 | c forecasts for SEATS adjustments. See desfc2.prm for data dictionaries. 4 | c----------------------------------------------------------------------- 5 | DATA df2ptr / 6 | & 1, 39, 97, 138, 179, 221, 263, 312, 381, 424, 7 | & 467, 516, 565, 565, 565, 565, 565, 565, 605, 646, 8 | & 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 9 | & 646, 646, 646, 646, 646, 646, 719, 780, 820, 861, 10 | & 881, 911, 911, 911, 911, 911, 982,1041,1041 / 11 | -------------------------------------------------------------------------------- /tools/x13as_html/desfsa.var: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c pointers for descriptions of series and output dealing with 3 | c X-11 seasonal adjustment (tables 8-20). See desfsa.prm for data dictionaries. 4 | c----------------------------------------------------------------------- 5 | DATA dssptr / 6 | & 1, 34, 60, 131, 187, 281, 328, 346, 384, 413, 7 | & 442, 464, 531, 556, 627, 669, 706, 743, 773, 831, 8 | & 901, 918, 965, 988,1031,1063,1095,1120,1190,1245, 9 | & 1288,1325,1369,1407 / 10 | -------------------------------------------------------------------------------- /tools/x13as_html/desmdl.var: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c pointers for descriptions of series and output dealing with 3 | c regARIMA modelling. See desmdl.prm for data dictionaries. 4 | c----------------------------------------------------------------------- 5 | DATA dsmptr / 6 | & 1, 31, 31, 66, 95, 134, 177, 212, 242, 268, 7 | & 310, 350, 379, 379, 409, 471, 523, 593, 653, 653, 8 | & 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 9 | & 684, 684, 684, 715, 746, 746, 746, 746, 791, 791, 10 | & 840, 892, 931, 977,1030,1030,1062,1099,1133,1180, 11 | & 1180,1180,1219,1252,1252,1281,1306,1330,1362,1394, 12 | & 1427,1459,1494,1537,1580,1633,1656,1716,1760,1822, 13 | & 1882,1944 / 14 | -------------------------------------------------------------------------------- /tools/x13as_html/desset.var: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c pointers for descriptions of series and output dealing with 3 | c SEATS seasonal adjustment. See desset.prm for data dictionaries. 4 | c----------------------------------------------------------------------- 5 | DATA dseptr / 6 | & 1, 30, 81, 113, 192, 225, 305, 345, 411, 445, 7 | & 526, 567, 655, 707, 762, 799, 862, 919, 950, 982, 8 | & 1010,1026,1059,1089,1131,1179,1235,1292,1334,1377, 9 | & 1432,1473,1509,1546,1568,1591,1665,1717,1748,1787, 10 | & 1798,1819,1869,1927,1974 / 11 | -------------------------------------------------------------------------------- /tools/x13as_html/desspc.var: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c pointers for descriptions of series and output dealing with 3 | c spectral plots and diagnostics. See desspc.prm for data dictionaries. 4 | c----------------------------------------------------------------------- 5 | DATA dspptr / 6 | & 1, 32, 72, 122, 153, 203, 246, 288, 347, 387, 7 | & 419, 456, 502, 558, 595, 651, 700, 748, 813, 859, 8 | & 897, 932, 989,1029,1056,1094,1154 / 9 | -------------------------------------------------------------------------------- /tools/x13as_html/dessrs.prm: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c data dictionary for descriptions of series and output dealing with 3 | c data and transformations. See dessrs.var for pointers. 4 | c----------------------------------------------------------------------- 5 | CHARACTER DSRDIC*665 6 | INTEGER dsrptr 7 | DIMENSION dsrptr(0:PDSR) 8 | c----------------------------------------------------------------------- 9 | PARAMETER(DSRDIC='time series data (for the span analyzed)original 10 | & seriesinput specification fileoriginal series adjusted for missin 11 | &g value regressorsregARIMA calendar adjusted original dataregARIMA 12 | & outlier adjusted original dataoriginal series (prior adjusted)ori 13 | &ginal series (prior adjusted)time series data plus constant (for t 14 | &he span analyzed)original series plus constantprior-adjustment fac 15 | &torspermanent prior-adjustment factorstemporary prior-adjustment f 16 | &actorsprior-adjusted datapermanent prior-adjusted dataprior-adjust 17 | &ed data (including prior trading day adjustments)permanent prior-a 18 | &djusted data (including prior trading day adjustments)prior-adjust 19 | &ed and transformed data') 20 | -------------------------------------------------------------------------------- /tools/x13as_html/dessrs.var: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c pointers for descriptions of series and output dealing with 3 | c data and transformations. See dessrs.prm for data dictionaries. 4 | c----------------------------------------------------------------------- 5 | DATA dsrptr / 6 | & 1, 1, 41, 56, 80, 80, 133, 173, 212, 244, 7 | & 276, 330, 359, 383, 417, 451, 470, 499, 560, 631, 8 | & 666, 666 / 9 | -------------------------------------------------------------------------------- /tools/x13as_html/desst2.prm: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c data dictionary for descriptions of series and output dealing with 3 | c SEATS seasonal adjustment. See desst2.var for pointers. 4 | c----------------------------------------------------------------------- 5 | CHARACTER DS2DIC*219 6 | INTEGER ds2ptr 7 | DIMENSION ds2ptr(0:PDS2) 8 | c----------------------------------------------------------------------- 9 | PARAMETER(DS2DIC='standard error of final transitory component (SE 10 | &ATS)final seasonally adjusted series adjusted for outliers (SEATS) 11 | &final irregular component outlier adjusted (SEATS)final trend cycl 12 | &e not including outlier effects (SEATS)') 13 | -------------------------------------------------------------------------------- /tools/x13as_html/desst2.var: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c pointers for descriptions of series and output dealing with 3 | c SEATS seasonal adjustment. See desst2.prm for data dictionaries. 4 | c----------------------------------------------------------------------- 5 | DATA ds2ptr / 6 | & 1, 53, 115, 165,220 / 7 | -------------------------------------------------------------------------------- /tools/x13as_html/desx11.var: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c pointers for descriptions of series and output dealing with 3 | c X-11 seasonal adjustment (tables 1-7). See desx11.prm for data dictionaries. 4 | c----------------------------------------------------------------------- 5 | DATA dsxptr / 6 | & 1, 36, 71, 106, 124, 160, 196, 232, 267, 300, 7 | & 325, 372, 403, 434, 475, 516, 557, 581, 643, 694, 8 | & 745, 796, 833, 908, 944, 980,1016,1044,1111 / 9 | -------------------------------------------------------------------------------- /tools/x13as_html/desxrg.var: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c pointers for descriptions of series and output dealing with 3 | c irregular component regressions. See desxrg.prm for data dictionaries. 4 | c----------------------------------------------------------------------- 5 | DATA dsiptr / 6 | & 1, 26, 95, 164, 206, 242, 309, 370, 446, 516, 7 | & 579, 636, 700, 758, 831, 898, 898, 975, 975, 975, 8 | & 1037,1108,1173 / 9 | -------------------------------------------------------------------------------- /tools/x13as_html/dets.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /dets/ ... 3 | integer SeasCheck,nround,Nres0,Nres1 4 | integer q0,df0,imean0,bq0,bd0,Init0 5 | real*8 Va0,Va1,Jb0,Jb1,Acf1,Seacf1 6 | common /dets/ SeasCheck,nround,Nres0,Nres1, 7 | $ q0,df0,imean0,bq0,bd0,Init0, 8 | $ Va0,Va1,Jb0,Jb1,Acf1,Seacf1 9 | 10 | -------------------------------------------------------------------------------- /tools/x13as_html/dfdate.f: -------------------------------------------------------------------------------- 1 | **==dfdate.f processed by SPAG 4.03F at 09:47 on 1 Mar 1994 2 | SUBROUTINE dfdate(Datea,Dateb,Sp,Diff) 3 | IMPLICIT NONE 4 | c----------------------------------------------------------------------- 5 | c Finds the difference between two dates where the dates, datea and 6 | c dateb are length 2 arrays of year then period. 7 | c----------------------------------------------------------------------- 8 | INTEGER Datea(2),Dateb(2),Sp,Diff 9 | c----------------------------------------------------------------------- 10 | IF(Sp.gt.1)THEN 11 | Diff=Sp*(Datea(1)-Dateb(1))+Datea(2)-Dateb(2) 12 | ELSE 13 | Diff=Datea(1)-Dateb(1) 14 | END IF 15 | c ------------------------------------------------------------------ 16 | RETURN 17 | END 18 | -------------------------------------------------------------------------------- /tools/x13as_html/dgnsvl.i: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c Table pointer variables used for svltbl are of the form LSL 3 | c where the types are 4 | c----------------------------------------------------------------------- 5 | c Average absolute revision for seasonally adjusted series ASA 6 | c Average absolute revision for seasonal factors ASF 7 | c Average absolute revision for projected seasonal factors ASP 8 | c Percent flagged for seasonal factors SFP 9 | c----------------------------------------------------------------------- 10 | INTEGER LSLASA,LSLASF,LSLASP,LSLAFE,LSLALR,LSLPCT 11 | PARAMETER( 12 | & LSLASA= 50,LSLASF= 55,LSLASP= 56,LSLAFE= 57,LSLALR= 58, 13 | & LSLPCT= 59) 14 | -------------------------------------------------------------------------------- /tools/x13as_html/dimensions.i: -------------------------------------------------------------------------------- 1 | c DIMENSIONS.i 2 | integer nfrq,nw2 3 | parameter (nfrq=61,nw2=600) 4 | integer MP,kp,mpkp 5 | parameter(MP=POBS,KP=PFCST,mpkp=mp+kp) 6 | integer maxTh 7 | parameter (maxTh=40) 8 | integer KL 9 | parameter (KL=PFCST) 10 | -------------------------------------------------------------------------------- /tools/x13as_html/dirs.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /dir/ ... 3 | character OUTDIR*180,GRAPHDIR*180 4 | common /dir/ OUTDIR,GRAPHDIR 5 | -------------------------------------------------------------------------------- /tools/x13as_html/divgud.f: -------------------------------------------------------------------------------- 1 | C Last change: BCM 17 Apr 2003 10:54 pm 2 | SUBROUTINE divgud(Result,Array1,Array2,Jfda,Jlda) 3 | IMPLICIT NONE 4 | C----------------------------------------------------------------------- 5 | C --- THIS ROUTINE DIVIDES ARRAY1 BY ARRAY2 only for those observations 6 | c that are "good" for multiplicative seasonal adjustment 7 | c ------------------------------------------------------------------ 8 | c written by Brian Monsell, March 2006 9 | C----------------------------------------------------------------------- 10 | DOUBLE PRECISION Array1,Array2,Result 11 | INTEGER i,Jfda,Jlda 12 | DIMENSION Result(*),Array1(*),Array2(*) 13 | C----------------------------------------------------------------------- 14 | INCLUDE 'notset.prm' 15 | INCLUDE 'srslen.prm' 16 | INCLUDE 'goodob.cmn' 17 | C----------------------------------------------------------------------- 18 | DO i=Jfda,Jlda 19 | IF(Gudval(i))THEN 20 | Result(i)=Array1(i)/Array2(i) 21 | ELSE 22 | Result(i)=DNOTST 23 | END IF 24 | END DO 25 | C----------------------------------------------------------------------- 26 | RETURN 27 | END 28 | -------------------------------------------------------------------------------- /tools/x13as_html/divsub.f: -------------------------------------------------------------------------------- 1 | C Last change: BCM 17 Apr 2003 10:54 pm 2 | SUBROUTINE divsub(Result,Array1,Array2,Jfda,Jlda) 3 | IMPLICIT NONE 4 | C----------------------------------------------------------------------- 5 | C --- THIS ROUTINE DIVIDES ARRAY1 BY ARRAY2 OR SUBTRACTS ARRAY2 6 | C --- FROM ARRAY1 DEPENDING ON WHETHER A MULTIPLICATIVE OR ADDITIVE 7 | C --- ADJUSTMENT IS BEING MADE. 8 | C----------------------------------------------------------------------- 9 | DOUBLE PRECISION Array1,Array2,Result 10 | INTEGER i,Jfda,Jlda 11 | DIMENSION Result(*),Array1(*),Array2(*) 12 | C----------------------------------------------------------------------- 13 | INCLUDE 'srslen.prm' 14 | INCLUDE 'x11opt.cmn' 15 | C----------------------------------------------------------------------- 16 | IF(Muladd.eq.0)THEN 17 | DO i=Jfda,Jlda 18 | Result(i)=Array1(i)/Array2(i) 19 | END DO 20 | RETURN 21 | END IF 22 | DO i=Jfda,Jlda 23 | Result(i)=Array1(i)-Array2(i) 24 | END DO 25 | RETURN 26 | END 27 | -------------------------------------------------------------------------------- /tools/x13as_html/dot.f: -------------------------------------------------------------------------------- 1 | C Last change: BCM 25 Nov 97 2:57 pm 2 | **==dot.f processed by SPAG 4.03F at 09:47 on 1 Mar 1994 3 | SUBROUTINE dot(Jy1,Jy2,Jx) 4 | IMPLICIT NONE 5 | C*** Start of declarations inserted by SPAG 6 | INTEGER j,j1,j2,Jx,Jy1,Jy2 7 | C*** End of declarations inserted by SPAG 8 | INCLUDE 'srslen.prm' 9 | INCLUDE 'chrt.cmn' 10 | C************* 11 | j1=min(Jy1,Jy2)+1 12 | j2=max(Jy1,Jy2)-1 13 | IF(j2.ge.j1)THEN 14 | DO j=j1,j2 15 | Ia(Jx,j)=I7 16 | END DO 17 | END IF 18 | RETURN 19 | END 20 | -------------------------------------------------------------------------------- /tools/x13as_html/dpeq.f: -------------------------------------------------------------------------------- 1 | C Last change: BCM 30 Oct 97 10:24 am 2 | LOGICAL FUNCTION dpeq(X,Dtargt) 3 | IMPLICIT NONE 4 | c----------------------------------------------------------------------- 5 | c Avoids a floating point comparison error to test whether X is 6 | c equal to Dtargt 7 | c----------------------------------------------------------------------- 8 | DOUBLE PRECISION DELTA 9 | PARAMETER(DELTA=3.834D-20) 10 | c----------------------------------------------------------------------- 11 | DOUBLE PRECISION X,Dtargt,dx 12 | c----------------------------------------------------------------------- 13 | dpeq=.false. 14 | dx=dabs(X-Dtargt) 15 | IF(dx.lt.DELTA)dpeq=.true. 16 | c dpeq=.true. 17 | c IF(X.lt.Dtargt.or.X.gt.Dtargt)dpeq=.false. 18 | c----------------------------------------------------------------------- 19 | RETURN 20 | END 21 | -------------------------------------------------------------------------------- /tools/x13as_html/dscal.f: -------------------------------------------------------------------------------- 1 | **==dscal.f processed by SPAG 4.03F at 09:48 on 1 Mar 1994 2 | SUBROUTINE dscal(N,Da,Dx,Incx) 3 | IMPLICIT NONE 4 | C 5 | C REPLACE DOUBLE PRECISION DX BY DOUBLE PRECISION DA*DX. 6 | C FOR I = 0 TO N-1, REPLACE DX(1+I*INCX) WITH DA * DX(1+I*INCX) 7 | C 8 | INTEGER i,Incx,m,mp1,N,ns 9 | DOUBLE PRECISION Da,Dx(*) 10 | IF(N.le.0)RETURN 11 | IF(Incx.eq.1)THEN 12 | C 13 | C CODE FOR INCREMENTS EQUAL TO 1. 14 | C 15 | C 16 | C CLEAN-UP LOOP SO REMAINING VECTOR LENGTH IS A MULTIPLE OF 5. 17 | C 18 | m=mod(N,5) 19 | IF(m.ne.0)THEN 20 | DO i=1,m 21 | Dx(i)=Da*Dx(i) 22 | END DO 23 | IF(N.lt.5)RETURN 24 | END IF 25 | ELSE 26 | C 27 | C CODE FOR INCREMENTS NOT EQUAL TO 1. 28 | C 29 | ns=N*Incx 30 | DO i=1,ns,Incx 31 | Dx(i)=Da*Dx(i) 32 | END DO 33 | RETURN 34 | END IF 35 | mp1=m+1 36 | DO i=mp1,N,5 37 | Dx(i)=Da*Dx(i) 38 | Dx(i+1)=Da*Dx(i+1) 39 | Dx(i+2)=Da*Dx(i+2) 40 | Dx(i+3)=Da*Dx(i+3) 41 | Dx(i+4)=Da*Dx(i+4) 42 | END DO 43 | RETURN 44 | END 45 | -------------------------------------------------------------------------------- /tools/x13as_html/eee.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /eee/ ... 3 | real*8 BJSTAT1,BJSTAT2,PSTAT1,PSTAT2 4 | common /eee/ BJSTAT1,BJSTAT2,PSTAT1,PSTAT2 5 | -------------------------------------------------------------------------------- /tools/x13as_html/eltlen.f: -------------------------------------------------------------------------------- 1 | C Last change: BCM 1 Dec 1998 10:09 am 2 | **==eltlen.f processed by SPAG 4.03F at 09:48 on 1 Mar 1994 3 | SUBROUTINE eltlen(Istr,Ptrvec,Nstr,Length) 4 | IMPLICIT NONE 5 | c ----------------------------------------------------------------- 6 | INCLUDE 'stdio.i' 7 | INTEGER Istr,Length,Nstr,Ptrvec 8 | DIMENSION Ptrvec(0:Nstr) 9 | INCLUDE 'units.cmn' 10 | c ----------------------------------------------------------------- 11 | IF(Istr.lt.1.or.Istr.gt.Nstr)THEN 12 | WRITE(STDERR,1010)Istr,Nstr 13 | 1010 FORMAT(' ERROR: No position',i3,' in ',i3, 14 | & ' long character vector.') 15 | CALL errhdr 16 | WRITE(Mt2,1011)Istr,Nstr 17 | 1011 FORMAT('

ERROR: No position',i3,' in ',i3, 18 | & ' long character vector.

') 19 | CALL abend 20 | RETURN 21 | c ----------------------------------------------------------------- 22 | ELSE 23 | Length=Ptrvec(Istr)-Ptrvec(Istr-1) 24 | END IF 25 | c ----------------------------------------------------------------- 26 | RETURN 27 | END 28 | -------------------------------------------------------------------------------- /tools/x13as_html/entsch.f: -------------------------------------------------------------------------------- 1 | **==entsch.f processed by SPAG 4.03F at 16:21 on 30 Mar 1994 2 | C*********************************************************************** 3 | c This routine is modified code which originally appeared in X12W - 4 | c the seasonal adjustment program developed by the Budesbank 5 | C*********************************************************************** 6 | SUBROUTINE entsch(Ken,Ker,Ken1,Ker1,Iv) 7 | IMPLICIT NONE 8 | C*** Start of declarations inserted by SPAG 9 | INTEGER Iv,k,Ken,Ken1,Ker,Ker1 10 | C*** End of declarations inserted by SPAG 11 | k=Ken+Ker+1 12 | Ken1=0 13 | Ker1=0 14 | GO TO(10,20,30,40,50),k 15 | 10 Ken1=Iv 16 | Ker1=2 17 | GO TO 50 18 | 20 Ken1=1 19 | GO TO 50 20 | 30 Ken1=Iv 21 | Ker1=Iv 22 | GO TO 50 23 | 40 Ken1=1 24 | Ker1=2 25 | 50 RETURN 26 | END 27 | -------------------------------------------------------------------------------- /tools/x13as_html/error.cmn: -------------------------------------------------------------------------------- 1 | C----------------------------------------------------------------------- 2 | c Logical indicator variable for program errors during execution. 3 | C----------------------------------------------------------------------- 4 | LOGICAL Lfatal 5 | COMMON /fcnerr/ Lfatal 6 | C----------------------------------------------------------------------- 7 | 8 | -------------------------------------------------------------------------------- /tools/x13as_html/estb.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /estb/ ... 3 | integer NCHI,NCYC 4 | common /estb/ NCHI,NCYC 5 | -------------------------------------------------------------------------------- /tools/x13as_html/estgc.i: -------------------------------------------------------------------------------- 1 | real*8 gc(32),gs(32),gt(32) 2 | common /estgc/ gc,gs,gt 3 | -------------------------------------------------------------------------------- /tools/x13as_html/extend.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c Nobspf - number of observations copied 3 | c Nofpob - number of forecasts plus observations 4 | c Nbfpob - number of backcasts plus forecasts plus observations 5 | c Nfcst - number of forecasts 6 | c Nbcst - number of backcasts 7 | c Nbcst2 - number of backcasts + Number of observations from start 8 | c of series to January of first year 9 | c Begbak - beginning date of backcast extended series 10 | c Begbk2 - beginning date of data vectors (first period of Begbak) 11 | c----------------------------------------------------------------------- 12 | INTEGER Begbak,Begbk2,Nbcst2,Nobspf,Nfcst,Nbcst,Nofpob,Nbfpob, 13 | & Nfdrp 14 | DIMENSION Begbak(2),Begbk2(2) 15 | COMMON /fctcmn / Begbak,Begbk2,Nfcst,Nbcst,Nbcst2,Nobspf,Nofpob, 16 | & Nbfpob,Nfdrp 17 | -------------------------------------------------------------------------------- /tools/x13as_html/fctlbl.prm: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c data dictionary for descriptions of series and output dealing with 3 | c X-13 output labels of forecasts and other special tables. See fctlbl.var for pointers. 4 | c----------------------------------------------------------------------- 5 | CHARACTER LBFDIC*373 6 | INTEGER lbfptr,PLBF 7 | PARAMETER(PLBF=395) 8 | DIMENSION lbfptr(0:PLBF) 9 | c----------------------------------------------------------------------- 10 | PARAMETER(LBFDIC='B 1.AA 8.AA 8.TC.AA 8.SO.AA 6.AA 7.AA 9.AA 10.AA 11 | & 13.AD 10.AD 10.AD 10.ED 10.CD 10.TH 1.AA 16.AD 16.AD 16.AD 16.CD 12 | &18.AE 18.AE 18.CD 11.FFA 4.CC 16.AC 18.AC 16H.AC 16C.AC 18C.AB 1.A 13 | &D 10.AD 10.AD 10.CE 18.AE 18.CD 18.AD 16.AD 16.AD 11.FFS 12.AS 12. 14 | &DS 10.AS 10.AS 13.AS 13.AS 11.AS 11.DS 14.AS 14.AS 16.AS 16.AS 18. 15 | &AS 18.CS 1.FS 11.FS 12.FS 10.CS 14.TCFS 14.DTCFS 11.OAS 13.OA') 16 | -------------------------------------------------------------------------------- /tools/x13as_html/fcttitle.var: -------------------------------------------------------------------------------- 1 | DATA ttfptr / 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 2 | &1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,47,103,150,193,252,252, 3 | &310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310, 4 | &310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310, 5 | &310,310,310,352,395,395,395,395,395,395,395,395,395,395,395,395, 6 | &395,395,395,395,429,429,429,476,521,521,521,521,521,521,521,521, 7 | &521,521,521,521,521,521,521,521,521,521,521,521,521,521,521,565, 8 | &565,565,565,565,565,626,626,687,687,745,745,793,793,850,850,850, 9 | &850,850,850,850,850,850,883,883,914,914,997,997,1038,1038,1038, 10 | &1038,1119,1119,1150,1150,1193,1193,1193,1193,1193,1193,1193,1193, 11 | &1193,1193,1193,1193,1193,1193,1193,1193,1193,1193,1193,1193,1193, 12 | &1193,1193,1193,1244,1296,1296,1296,1296,1296,1296,1296,1296,1296, 13 | &1296,1296,1296,1296,1296,1296,1296,1296,1296,1296,1296,1296,1296, 14 | &1296,1296,1296,1296,1296,1296,1296,1296,1296,1296 / 15 | -------------------------------------------------------------------------------- /tools/x13as_html/fdate.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE fdate(Dattim) 2 | IMPLICIT NONE 3 | c----------------------------------------------------------------------- 4 | c Mimics the SUN system routine that prints the date and time 5 | c----------------------------------------------------------------------- 6 | CHARACTER Dattim*24 7 | c----------------------------------------------------------------------- 8 | c date is a Lahey DOS interface routine that returns the 9 | c current time of day in MM/DD/YY format, left-justified and 10 | c space filled. 11 | c----------------------------------------------------------------------- 12 | call date_and_time(date=Dattim(3:10)) 13 | c----------------------------------------------------------------------- 14 | c time is a Lahey DOS interface routine that returns the 15 | c current time of day in HH:MM:SS.hh format, left-justified and 16 | c space filled. 17 | c----------------------------------------------------------------------- 18 | CALL date_and_time(time=Dattim(13:24)) 19 | c ------------------------------------------------------------------ 20 | RETURN 21 | END 22 | -------------------------------------------------------------------------------- /tools/x13as_html/fft.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /fft/ ... 3 | integer maxnz_1,nz 4 | double precision pi2 5 | parameter( maxnz_1=1099,pi2=6.28318530717959d0) 6 | double precision wgr(0:maxnz_1),wgi(0:maxnz_1) 7 | common /FFT_block/ wgr,wgi,nz 8 | -------------------------------------------------------------------------------- /tools/x13as_html/filetb.cmn: -------------------------------------------------------------------------------- 1 | c ------------------------------------------------------------------ 2 | c common block to control printing of file table. 3 | c----------------------------------------------------------------------- 4 | INTEGER Fhandl 5 | LOGICAL Lexist,Lexout,Lexerr,Lfrtop,Lnoind 6 | c----------------------------------------------------------------------- 7 | COMMON /filetb/ Fhandl,Lexist,Lexout,Lexerr,Lfrtop,Lnoind 8 | c----------------------------------------------------------------------- 9 | -------------------------------------------------------------------------------- /tools/x13as_html/filext.prm: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c vector of file extensions used to save tables. See filext.var 3 | c for actual table names. 4 | c----------------------------------------------------------------------- 5 | CHARACTER tbxdic*3 6 | DIMENSION tbxdic(NTBL) 7 | -------------------------------------------------------------------------------- /tools/x13as_html/fis.f: -------------------------------------------------------------------------------- 1 | C Last change: BCM 29 Oct 97 7:11 am 2 | **==fis.f processed by SPAG 4.03F at 09:48 on 1 Mar 1994 3 | DOUBLE PRECISION FUNCTION fis(Cs,N) 4 | IMPLICIT NONE 5 | C*** Start of declarations inserted by SPAG 6 | DOUBLE PRECISION c,Cs 7 | INTEGER N 8 | C*** End of declarations inserted by SPAG 9 | C --- THIS FUNCTION ADJUSTS THE I/S RATIO FOR THE NUMBER OF YEARS 10 | C 11 | DIMENSION c(8) 12 | DATA c/1.00000D0,1.02584D0,1.01779D0,1.01383D0,1.00000D0, 13 | & 3.00000D0,1.55291D0,1.30095D0/ 14 | IF(N.lt.6)THEN 15 | fis=c(N-1) 16 | Cs=c(N+3) 17 | RETURN 18 | END IF 19 | Cs=dble(N)*1.732051D0/(8.485281D0+dble(N-6)*1.732051D0) 20 | fis=DBLE(N)*12.247449D0/(73.239334D0+dble(N-6)*12.247449D0) 21 | RETURN 22 | END 23 | -------------------------------------------------------------------------------- /tools/x13as_html/fitmod.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /fitmod/ ... 3 | real*8 THSV1,SISV1 4 | common /fitmod/ THSV1,SISV1 5 | -------------------------------------------------------------------------------- /tools/x13as_html/frctbl.i: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c Table pointer variables used for prttbl and savtbl are of the form 3 | c L where the spec codes are 4 | c----------------------------------------------------------------------- 5 | c force FRC or FC 6 | c----------------------------------------------------------------------- 7 | c and the types are 8 | c----------------------------------------------------------------------- 9 | c change in adjusted seasonal adjusted E6A 10 | c change in rounded seasonal adjusted E6R 11 | c seasonal adjusted, yr totals adj SAA 12 | c rounded seasonal adjusted RND 13 | c----------------------------------------------------------------------- 14 | INTEGER LFCSAA,LFCRND,LFCE6A,LFC6AP,LFCE6R,LFC6RP,LFRCCR,LFRCRR, 15 | & LFRFAC 16 | PARAMETER( 17 | & LFCSAA=209,LFCRND=210,LFCE6A=211,LFC6AP=212,LFCE6R=213, 18 | & LFC6RP=214,LFRCCR=215,LFRCRR=216,LFRFAC=217) 19 | -------------------------------------------------------------------------------- /tools/x13as_html/fstop.f: -------------------------------------------------------------------------------- 1 | **==fstop.f processed by SPAG 4.03F at 09:48 on 1 Mar 1994 2 | SUBROUTINE fstop() 3 | IMPLICIT NONE 4 | c----------------------------------------------------------------------- 5 | c Opens a file with the given options and assigns a file handle 6 | c----------------------------------------------------------------------- 7 | c Parameters and include files 8 | c----------------------------------------------------------------------- 9 | INCLUDE 'stdio.i' 10 | c----------------------------------------------------------------------- 11 | c Local Arguments 12 | c Name Type Description 13 | c----------------------------------------------------------------------- 14 | c ifile i Index for the current file 15 | c----------------------------------------------------------------------- 16 | INTEGER ifile 17 | c----------------------------------------------------------------------- 18 | c Close all the open files and stop 19 | c----------------------------------------------------------------------- 20 | DO ifile=1,Nfile 21 | CLOSE(Fillst(ifile)) 22 | END DO 23 | Nfile=0 24 | c ------------------------------------------------------------------ 25 | RETURN 26 | END 27 | -------------------------------------------------------------------------------- /tools/x13as_html/func.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /func/ ... 3 | integer NV,NS 4 | real*8 V(50),FS(27) 5 | common /func/ V,FS,NV,NS 6 | -------------------------------------------------------------------------------- /tools/x13as_html/func2.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /func2/ ... 3 | integer NUT,NT 4 | real*8 UT(22),FT(8) 5 | common /func2/ UT,FT,NUT,NT 6 | -------------------------------------------------------------------------------- /tools/x13as_html/func3.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /func3/ ... 3 | integer NUC,NC 4 | real*8 UC(32),FC(32) 5 | common /func3/ UC,FC,NUC,NC 6 | -------------------------------------------------------------------------------- /tools/x13as_html/func4.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /func4/ ... 3 | integer NF,NH 4 | real*8 FF(32),FH(32) 5 | common /func4/ FF,FH,NF,NH 6 | -------------------------------------------------------------------------------- /tools/x13as_html/func5.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /func5/ ... 3 | integer NDUM,NDUM1 4 | real*8 DUM(80),DUM1(80) 5 | common /func5/ DUM,DUM1,NDUM,NDUM1 6 | -------------------------------------------------------------------------------- /tools/x13as_html/func5f1.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /func5f1/ ... 3 | integer NDUMf1,ND1f1 4 | real*8 DUMf1(200),DUM1f1(160) 5 | common /func5f1/ DUMf1,DUM1f1,NDUMf1,ND1f1 6 | -------------------------------------------------------------------------------- /tools/x13as_html/getarg.cmn: -------------------------------------------------------------------------------- 1 | C----------------------------------------------------------------------- 2 | c Arg : Character vector containing command line arguments 3 | c Ptr : Pointer vector for arguments 4 | c Narg : Number of arguments in Arg 5 | C----------------------------------------------------------------------- 6 | CHARACTER Arg*(CLEN) 7 | INTEGER Ptr(0:NUMARG),Narg 8 | COMMON / argcmn / Narg,Ptr,Arg 9 | 10 | -------------------------------------------------------------------------------- /tools/x13as_html/getarg.prm: -------------------------------------------------------------------------------- 1 | C----------------------------------------------------------------------- 2 | c CLEN: Maximum length of argument vector 3 | c NUMARG: Maximum number of arguments 4 | C----------------------------------------------------------------------- 5 | INTEGER CLEN,NUMARG 6 | PARAMETER(CLEN=256,NUMARG=20) 7 | 8 | -------------------------------------------------------------------------------- /tools/x13as_html/getchr.f: -------------------------------------------------------------------------------- 1 | C Last change: BCM 15 Jan 98 11:08 am 2 | CHARACTER*1 FUNCTION getchr(Nxtchr) 3 | c----------------------------------------------------------------------- 4 | c getchr.f, Release 1, Subroutine Version 1.3, Modified 20 Oct 1994. 5 | c----------------------------------------------------------------------- 6 | IMPLICIT NONE 7 | INCLUDE 'lex.i' 8 | LOGICAL rngbuf 9 | CHARACTER*1 Nxtchr 10 | EXTERNAL rngbuf 11 | c ----------------------------------------------------------------- 12 | IF(Pos(PCHAR).gt.Lineln)THEN 13 | IF(rngbuf(2,Lineno,Linex,Lineln))THEN 14 | Pos(PLINE)=Lineno 15 | Pos(PCHAR)=1 16 | ELSE 17 | Pos(PCHAR)=1 18 | END IF 19 | END IF 20 | c ----------------------------------------------------------------- 21 | getchr=Linex(Pos(PCHAR):Pos(PCHAR)) 22 | Pos(PCHAR)=Pos(PCHAR)+1 23 | c ----------------------------------------------------------------- 24 | Nxtchr=getchr 25 | c ----------------------------------------------------------------- 26 | RETURN 27 | END 28 | -------------------------------------------------------------------------------- /tools/x13as_html/getdbl.f: -------------------------------------------------------------------------------- 1 | C Last change: BCM 15 Jan 98 11:07 am 2 | **==getdbl.f processed by SPAG 4.03F at 09:49 on 1 Mar 1994 3 | LOGICAL FUNCTION getdbl(Tmp) 4 | IMPLICIT NONE 5 | c---------------------------------------------------------------------- 6 | c Returns an integer from the input stream and returns 7 | c true otherwise returns false and tmp is undefined. 8 | c---------------------------------------------------------------------- 9 | INCLUDE 'lex.i' 10 | c ----------------------------------------------------------------- 11 | INTEGER ipos 12 | DOUBLE PRECISION ctod,Tmp 13 | EXTERNAL ctod 14 | c ----------------------------------------------------------------- 15 | getdbl=.false. 16 | c ----------------------------------------------------------------- 17 | IF(Nxtktp.ne.EOF)THEN 18 | ipos=Lstpos(PCHAR) 19 | c ----------------------------------------------------------------- 20 | Tmp=ctod(Linex(1:Lineln),ipos) 21 | IF(ipos.gt.Lstpos(PCHAR))THEN 22 | Pos(PCHAR)=ipos 23 | getdbl=.true. 24 | CALL lex() 25 | END IF 26 | END IF 27 | c ----------------------------------------------------------------- 28 | RETURN 29 | END 30 | -------------------------------------------------------------------------------- /tools/x13as_html/getint.f: -------------------------------------------------------------------------------- 1 | C Last change: BCM 15 Jan 98 11:07 am 2 | **==getint.f processed by SPAG 4.03F at 09:49 on 1 Mar 1994 3 | LOGICAL FUNCTION getint(Tmp) 4 | IMPLICIT NONE 5 | c---------------------------------------------------------------------- 6 | c Returns an integer from the input stream and returns 7 | c true otherwise returns false and tmp is undefined. 8 | c---------------------------------------------------------------------- 9 | INCLUDE 'lex.i' 10 | c---------------------------------------------------------------------- 11 | INTEGER ctoi,ipos,Tmp 12 | EXTERNAL ctoi 13 | c---------------------------------------------------------------------- 14 | getint=.false. 15 | c---------------------------------------------------------------------- 16 | IF(Nxtktp.ne.EOF)THEN 17 | ipos=Lstpos(PCHAR) 18 | c---------------------------------------------------------------------- 19 | Tmp=ctoi(Linex(1:Lineln),ipos) 20 | IF(ipos.gt.Lstpos(PCHAR))THEN 21 | Pos(PCHAR)=ipos 22 | getint=.true. 23 | CALL lex() 24 | END IF 25 | END IF 26 | c---------------------------------------------------------------------- 27 | RETURN 28 | END 29 | -------------------------------------------------------------------------------- /tools/x13as_html/global.cmn: -------------------------------------------------------------------------------- 1 | DOUBLE PRECISION P0,Qp,K,Qk,Svk,Snr,Sni,U,V0,A0,B0,C,D0,A1,A3, 2 | & A7,E,F,G,H,Szr,Szi,Lzr,Lzi,Eta,Are,Mre 3 | INTEGER N,N0 4 | C----------------------------------------------------------------------- 5 | DIMENSION P0(PORDER+1),Qp(PORDER+1),K(PORDER+1),Qk(PORDER+1), 6 | & Svk(PORDER+1) 7 | C----------------------------------------------------------------------- 8 | COMMON /global/ P0,Qp,K,Qk,Svk,Snr,Sni,U,V0,A0,B0,C,D0,A1,A3, 9 | & A7,E,F,G,H,Szr,Szi,Lzr,Lzi,Eta,Are,Mre,N,N0 10 | C----------------------------------------------------------------------- 11 | -------------------------------------------------------------------------------- /tools/x13as_html/goodob.cmn: -------------------------------------------------------------------------------- 1 | c ------------------------------------------------------------------ 2 | c Common block contains a variable that indicates whether an 3 | c individual observation is "good" for multiplicative seasonal 4 | c adjustment (ie, > 0) 5 | c ------------------------------------------------------------------ 6 | LOGICAL Gudval 7 | DIMENSION Gudval(PLEN) 8 | c ------------------------------------------------------------------ 9 | COMMON /goodob/ Gudval 10 | -------------------------------------------------------------------------------- /tools/x13as_html/grzmyr.f: -------------------------------------------------------------------------------- 1 | C Last change: BCM 4 Sep 1998 3:34 pm 2 | **==grzmyr.f processed by SPAG 4.03F at 09:49 on 1 Mar 1994 3 | SUBROUTINE grzmyr(L) 4 | IMPLICIT NONE 5 | c----------------------------------------------------------------------- 6 | DOUBLE PRECISION BIG 7 | PARAMETER(BIG=10D16) 8 | c----------------------------------------------------------------------- 9 | INCLUDE 'srslen.prm' 10 | INCLUDE 'chrt.cmn' 11 | INCLUDE 'units.cmn' 12 | c----------------------------------------------------------------------- 13 | INTEGER i,iyr,L 14 | c DOUBLE PRECISION Ab2(61),Ser2(61,12) 15 | c----------------------------------------------------------------------- 16 | c COMMON /grzg2 / Ab1,Ab2 17 | c COMMON /grzmon/ Ser1,Ser2 18 | c----------------------------------------------------------------------- 19 | LOGICAL dpeq 20 | EXTERNAL dpeq 21 | c----------------------------------------------------------------------- 22 | i=0 23 | DO iyr=1,61 24 | IF(.not.dpeq(Ser1(iyr,L),BIG))THEN 25 | i=i+1 26 | Ab1(i)=Ser1(iyr,L) 27 | c Ab2(i)=Ser2(iyr,L) 28 | END IF 29 | END DO 30 | RETURN 31 | END 32 | -------------------------------------------------------------------------------- /tools/x13as_html/hdflag.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /handle_flag/ ... 3 | integer HANDLE 4 | common /handle_flag/ HANDLE 5 | -------------------------------------------------------------------------------- /tools/x13as_html/hender.f: -------------------------------------------------------------------------------- 1 | **==hender.f processed by SPAG 4.03F at 09:50 on 1 Mar 1994 2 | SUBROUTINE hender(W,N) 3 | IMPLICIT NONE 4 | C*** Start of declarations inserted by SPAG 5 | DOUBLE PRECISION ONE,THREE,FOUR,NINE 6 | PARAMETER(NINE=9D0,THREE=3D0,FOUR=4D0,ONE=1D0) 7 | DOUBLE PRECISION denomi,W,x,y,y1,y2,y3,y4,y5 8 | INTEGER i,m,N 9 | C*** End of declarations inserted by SPAG 10 | C 11 | C THIS SUBROUTINE GENERATES THE WEIGHTS FOR AN N-TERM HENDERSON 12 | C MOVING AVERAGE. THE WEIGHTS ARE STORED IN W. ONLY HALF THE WEIGHTS 13 | C ARE GENERATED SINCE W IS SYMMETRIC. 14 | C 15 | DIMENSION W(*) 16 | y=dble((N+3)/2) 17 | m=(N+1)/2 18 | y1=(y-ONE)*(y-ONE) 19 | y2=y*y 20 | y3=(y+ONE)*(y+ONE) 21 | y4=THREE*y2-16D0 22 | y5=FOUR*y2 23 | denomi=8D0*y*(y2-ONE)*(y5-ONE)*(y5-NINE)*(y5-25D0)/315D0 24 | DO i=1,m 25 | x=dble((i-1)*(i-1)) 26 | W(i)=(y1-x)*(y2-x)*(y3-x)*(y4-11D0*x)/denomi 27 | END DO 28 | RETURN 29 | END 30 | -------------------------------------------------------------------------------- /tools/x13as_html/hender.prm: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c PMXHND : Maximum length of a Henderson filter 3 | c----------------------------------------------------------------------- 4 | INTEGER PMXHND,PMXHN1,PMXHN2 5 | PARAMETER(PMXHND=101,PMXHN1=PMXHND-1,PMXHN2=(PMXHND+1)/2) 6 | 7 | -------------------------------------------------------------------------------- /tools/x13as_html/hspect.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /hspect/ ... 3 | integer NCHINS,NCYCNS,NPSINS,NADJNS 4 | common /hspect/ NCHINS,NCYCNS,NPSINS,NADJNS 5 | -------------------------------------------------------------------------------- /tools/x13as_html/html.i: -------------------------------------------------------------------------------- 1 | C... Variables in Common Block /html/ ... 2 | character Toutfilename*180 3 | integer nul 4 | common /html/ Toutfilename,nul 5 | -------------------------------------------------------------------------------- /tools/x13as_html/htmlfile.cmn: -------------------------------------------------------------------------------- 1 | C----------------------------------------------------------------------- 2 | CHARACTER LogfHTML*(PFILCR),CsrsHTML*(PFILCR) 3 | INTEGER NlfHTML,NcsHTML,Nlflast,Ncslast 4 | C----------------------------------------------------------------------- 5 | COMMON /cfhtml/ NlfHTML,NcsHTML,Nlflast,Ncslast,LogfHTML,CsrsHTML 6 | -------------------------------------------------------------------------------- /tools/x13as_html/htmlout.cmn: -------------------------------------------------------------------------------- 1 | C----------------------------------------------------------------------- 2 | INTEGER PNINDX,PNFOOT 3 | PARAMETER(PNINDX=5000,PNFOOT=1000) 4 | C----------------------------------------------------------------------- 5 | INTEGER Inpe,Inse,Intv,Ingr,Invl,Inss,Inssp,Indf,Inms,Infv,Inbt, 6 | & Inrs,Intl,Inrl,Inim,Infq,Inmd,Inmu,Insd,Indy,Inspn,Inmq, 7 | & Inqs,Innp,Inrv,Inlgfl,Infoot,VFoot,Idxtab,Idxlog,Vindx, 8 | & Inspc,Inpmdl,Inplkh,Inpacf,indCoef,indMdp,indMdl 9 | CHARACTER Cbr*6,Charhr*6 10 | DIMENSION VFoot(PNFOOT),Vindx(PNINDX),Indy(7),Inssp(6) 11 | C----------------------------------------------------------------------- 12 | COMMON /chtml/ Inpe,Inse,Intv,Ingr,Invl,Inss,Inssp,Indf,Inms,Infv, 13 | & Inbt,Inrs,Intl,Inrl,Inim,Infq,Inmd,Inmu,Insd,Inmq,Inqs,Innp, 14 | & Inrv,Inlgfl,Idxtab,Idxlog,Infoot,Indy,Vfoot,Vindx,Inspn, 15 | & Inspc,Inpmdl,Inplkh,Inpacf,Cbr,Charhr,indCoef,indMdp,indMdl 16 | C----------------------------------------------------------------------- 17 | -------------------------------------------------------------------------------- /tools/x13as_html/htmlout.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x13org/x13binary/c7d0198181c9f09353da0136f5c18da6b0d40999/tools/x13as_html/htmlout.f -------------------------------------------------------------------------------- /tools/x13as_html/htmlout.prm: -------------------------------------------------------------------------------- 1 | INTEGER PSTAR1F, PSTAR2F, PAMP1F, PAMP2F, PATSG1F, PATSG2F, 2 | & PNOTINC, PSIGNCH, PINCON, PTURNP, PSSPCT1, PSSPCT2, 3 | & PSSPCT3, PSSPCT4, PSSPLS1, PSSPLS2, PSSPLS3, PSSPLS4, 4 | & PSSHSH1, PSSHSH2, PSSHSH3, PSSHSH4, PSSDLR1, PSSDLR2, 5 | & PSSDLR3, PSSDLR4, PSSAT1, PSSAT2, PSSAT3, PSSAT4, 6 | & PSTRD8, PHSHD8, PATSD8, PAMPD8, PLSHD8, PMINTR1, 7 | & PMINTR2, PMINTR3, PMINTR4, PMINTR5, PMINTR6, PLGLNK, 8 | & PSTR1TP, PSTR2TP 9 | PARAMETER(PSTAR1F=1, PSTAR2F=2, PAMP1F=3, PAMP2F=4, PATSG1F=5, 10 | & PATSG2F=6, PNOTINC=7, PSIGNCH=100, PINCON=200, 11 | & PTURNP=400, 12 | & PSSPCT1=11, PSSPCT2=12, PSSPCT3=13, PSSPCT4=14, 13 | & PSSPLS1=15, PSSPLS2=16, PSSPLS3=17, PSSPLS4=18, 14 | & PSSHSH1=19, PSSHSH2=20, PSSHSH3=21, PSSHSH4=22, 15 | & PSSDLR1=23, PSSDLR2=24, PSSDLR3=25, PSSDLR4=26, 16 | & PSSAT1=27, PSSAT2=28, PSSAT3=29, PSSAT4=30, 17 | & PSTRD8=31, PHSHD8=32, PATSD8=33, PAMPD8=34, 18 | & PMINTR1=35, PMINTR2=36, PMINTR3=37, PMINTR4=38, 19 | & PMINTR5=39, PMINTR6=40, PLSHD8=10, PLGLNK=45, 20 | & PSTR1TP=46, PSTR2TP=47) 21 | -------------------------------------------------------------------------------- /tools/x13as_html/idamax.f: -------------------------------------------------------------------------------- 1 | integer function idamax(n,dx,incx) 2 | c 3 | c finds the index of element having max. absolute value. 4 | c jack dongarra, linpack, 3/11/78. 5 | c modified 3/93 to return if incx .le. 0. 6 | c modified 12/3/93, array(1) declarations changed to array(*) 7 | c 8 | double precision dx(*),dmax 9 | integer i,incx,ix,n 10 | c 11 | idamax = 0 12 | if( n.lt.1 .or. incx.le.0 ) return 13 | idamax = 1 14 | if(n.eq.1)return 15 | if(incx.eq.1)go to 20 16 | c 17 | c code for increment not equal to 1 18 | c 19 | ix = 1 20 | dmax = dabs(dx(1)) 21 | ix = ix + incx 22 | do 10 i = 2,n 23 | if(dabs(dx(ix)).le.dmax) go to 5 24 | idamax = i 25 | dmax = dabs(dx(ix)) 26 | 5 ix = ix + incx 27 | 10 continue 28 | return 29 | c 30 | c code for increment equal to 1 31 | c 32 | 20 dmax = dabs(dx(1)) 33 | do 30 i = 2,n 34 | if(dabs(dx(i)).le.dmax) go to 30 35 | idamax = i 36 | dmax = dabs(dx(i)) 37 | 30 continue 38 | return 39 | end 40 | 41 | -------------------------------------------------------------------------------- /tools/x13as_html/indhtml.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /indHtml/ ... 3 | integer iTab,iId,iAKey 4 | common /indHtml/ iTab,iId,iAKey -------------------------------------------------------------------------------- /tools/x13as_html/indx.f: -------------------------------------------------------------------------------- 1 | **==indx.f processed by SPAG 4.03F at 09:50 on 1 Mar 1994 2 | INTEGER FUNCTION indx(Str,Chr) 3 | IMPLICIT NONE 4 | c ----------------------------------------------------------------- 5 | CHARACTER Chr*1,Str*(*) 6 | c ----------------------------------------------------------------- 7 | DO indx=1,len(Str) 8 | IF(Chr.eq.Str(indx:indx))GO TO 10 9 | END DO 10 | indx=0 11 | c ----------------------------------------------------------------- 12 | 10 RETURN 13 | END 14 | -------------------------------------------------------------------------------- /tools/x13as_html/inpt.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c Series - copy of original series 3 | c Orig - original series 4 | c Orig2 - copy of original series with backcasts and forecasts 5 | c Sprior - prior adjustment factors 6 | c----------------------------------------------------------------------- 7 | DOUBLE PRECISION Orig,Series,Sprior,Orig2 8 | DIMENSION Orig(PLEN),Series(PLEN),Sprior(PLEN),Orig2(PLEN) 9 | c----------------------------------------------------------------------- 10 | COMMON /inpt1 / Series,Orig,Orig2,Sprior 11 | -------------------------------------------------------------------------------- /tools/x13as_html/inpt2.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | DOUBLE PRECISION Adrc,Adrci,Adri,Adrmcd,Cbar,Cbar2,Cibar,Cibar2, 3 | & Cimbar,Cisd,Csd,Csq,Ibar,Ibar2,Isq,Isd,Imbar, 4 | & Obar,Obar2,Ombar,Osd,Osq,Osq2,Rv,Sbar,Sbar2, 5 | & Smbar,Smbar2,Smic,Smsd,Ssd,Ssq,Tdbar,Tdsq,Vc,Vi, 6 | & Vp,Vs,Vtd 7 | c----------------------------------------------------------------------- 8 | DIMENSION Tdbar(PSP),Tdsq(PSP),Sbar(PSP),Sbar2(PSP),Ssq(PSP), 9 | & Ssd(PSP),Ibar(PSP),Ibar2(PSP),Isq(PSP),Isd(PSP), 10 | & Imbar(PSP),Cbar(PSP),Cbar2(PSP),Csq(PSP),Csd(PSP), 11 | & Obar(PSP),Obar2(PSP),Osq(PSP),Osd(PSP),Osq2(PSP), 12 | & Smbar(PSP),Smbar2(PSP),Smsd(PSP),Ombar(PSP),Cimbar(PSP), 13 | & Cibar(PSP),Cibar2(PSP),Cisd(PSP),Smic(PSP) 14 | c----------------------------------------------------------------------- 15 | COMMON /inpt2 / Tdbar,Tdsq,Sbar,Sbar2,Ssq,Ssd,Ibar,Ibar2,Isq,Isd, 16 | & Imbar,Cbar,Cbar2,Csq,Csd,Obar,Obar2,Osq,Osd,Osq2, 17 | & Smbar,Smbar2,Smsd,Ombar,Cimbar,Cibar,Cibar2,Cisd, 18 | & Smic,Vi,Vc,Vs,Vp,Vtd,Rv,Adrci,Adri,Adrc,Adrmcd 19 | -------------------------------------------------------------------------------- /tools/x13as_html/insdbl.f: -------------------------------------------------------------------------------- 1 | **==insdbl.f processed by SPAG 4.03F at 09:50 on 1 Mar 1994 2 | SUBROUTINE insdbl(Subvec,Ielt,Ptrvec,Nelt,Vec) 3 | IMPLICIT NONE 4 | c---------------------------------------------------------------------- 5 | c Inserts the character string elt into position ielt to vec 6 | c using the pointers that are assumed to be updated in insptr. 7 | c ptrvec is used to determine the length of vec. 8 | c---------------------------------------------------------------------- 9 | INCLUDE 'error.cmn' 10 | c---------------------------------------------------------------------- 11 | INTEGER nielt,Ielt,Nelt,nrest,Ptrvec 12 | DOUBLE PRECISION Subvec,Vec 13 | DIMENSION Ptrvec(0:Nelt),Subvec(*),Vec(*) 14 | c ----------------------------------------------------------------- 15 | CALL eltlen(Ielt,Ptrvec,Nelt,nielt) 16 | IF(Lfatal)RETURN 17 | nrest=Ptrvec(Nelt)-Ptrvec(Ielt) 18 | CALL copy(Vec(Ptrvec(Ielt-1)),nrest,-1,Vec(Ptrvec(Ielt))) 19 | c ----------------------------------------------------------------- 20 | CALL copy(Subvec,nielt,1,Vec(Ptrvec(Ielt-1))) 21 | c ----------------------------------------------------------------- 22 | RETURN 23 | END 24 | -------------------------------------------------------------------------------- /tools/x13as_html/insint.f: -------------------------------------------------------------------------------- 1 | **==insint.f processed by SPAG 4.03F at 09:50 on 1 Mar 1994 2 | SUBROUTINE insint(Subvec,Ielt,Ptrvec,Nelt,Vec) 3 | IMPLICIT NONE 4 | c---------------------------------------------------------------------- 5 | c Inserts the integer vector subvec into position ielt to vec 6 | c using the pointers that are assumed to be updated in insptr. 7 | c ptrvec is used to determine the length of vec. 8 | c---------------------------------------------------------------------- 9 | INCLUDE 'error.cmn' 10 | c---------------------------------------------------------------------- 11 | INTEGER nielt,Ielt,Nelt,nrest,Ptrvec 12 | INTEGER Subvec,Vec 13 | DIMENSION Ptrvec(0:Nelt),Subvec(*),Vec(*) 14 | c ----------------------------------------------------------------- 15 | CALL eltlen(Ielt,Ptrvec,Nelt,nielt) 16 | IF(Lfatal)RETURN 17 | nrest=Ptrvec(Nelt)-Ptrvec(Ielt) 18 | CALL cpyint(Vec(Ptrvec(Ielt-1)),nrest,-1,Vec(Ptrvec(Ielt))) 19 | c ----------------------------------------------------------------- 20 | CALL cpyint(Subvec,nielt,1,Vec(Ptrvec(Ielt-1))) 21 | c ----------------------------------------------------------------- 22 | RETURN 23 | END 24 | -------------------------------------------------------------------------------- /tools/x13as_html/inslg.f: -------------------------------------------------------------------------------- 1 | C Last change: BCM 25 Nov 97 10:33 am 2 | **==inslg.f processed by SPAG 4.03F at 09:50 on 1 Mar 1994 3 | SUBROUTINE inslg(Subvec,Ielt,Ptrvec,Nelt,Vec) 4 | IMPLICIT NONE 5 | c---------------------------------------------------------------------- 6 | c Inserts the character string elt into position ielt to vec 7 | c using the pointers that are assumed to be updated in insptr. 8 | c ptrvec is used to determine the length of vec. 9 | c---------------------------------------------------------------------- 10 | INCLUDE 'error.cmn' 11 | c ------------------------------------------------------------------ 12 | INTEGER nielt,Ielt,Nelt,nrest,Ptrvec 13 | LOGICAL Subvec,Vec 14 | DIMENSION Ptrvec(0:Nelt),Subvec(*),Vec(*) 15 | c ----------------------------------------------------------------- 16 | CALL eltlen(Ielt,Ptrvec,Nelt,nielt) 17 | IF(Lfatal)RETURN 18 | nrest=Ptrvec(Nelt)-Ptrvec(Ielt) 19 | CALL copylg(Vec(Ptrvec(Ielt-1)),nrest,-1,Vec(Ptrvec(Ielt))) 20 | c ----------------------------------------------------------------- 21 | CALL copylg(Subvec,nielt,1,Vec(Ptrvec(Ielt-1))) 22 | c ----------------------------------------------------------------- 23 | RETURN 24 | END 25 | -------------------------------------------------------------------------------- /tools/x13as_html/intfmt.f: -------------------------------------------------------------------------------- 1 | **==intfmt.f processed by SPAG 4.03F at 09:50 on 1 Mar 1994 2 | SUBROUTINE intfmt(Vec,Nelt,Clwdth) 3 | IMPLICIT NONE 4 | c----------------------------------------------------------------------- 5 | c Figures out the minimum number of columns needed to print out 6 | c a vector of integers 7 | c----------------------------------------------------------------------- 8 | INTEGER Clwdth,ielt,ival,iwdth,Nelt,Vec 9 | DIMENSION Vec(Nelt) 10 | c ------------------------------------------------------------------ 11 | Clwdth=0 12 | DO ielt=1,Nelt 13 | ival=Vec(ielt) 14 | c ------------------------------------------------------------------ 15 | IF(ival.eq.0)THEN 16 | iwdth=1 17 | ELSE 18 | iwdth=max(0,int(log10(float(abs(ival))))+1) 19 | END IF 20 | c ------------------------------------------------------------------ 21 | IF(Vec(ielt).lt.0)iwdth=iwdth+1 22 | Clwdth=max(Clwdth,iwdth) 23 | END DO 24 | c ------------------------------------------------------------------ 25 | RETURN 26 | END 27 | -------------------------------------------------------------------------------- /tools/x13as_html/intlst.f: -------------------------------------------------------------------------------- 1 | **==intlst.f processed by SPAG 4.03F at 09:50 on 1 Mar 1994 2 | SUBROUTINE intlst(Pelt,Ptrvec,Nstr) 3 | IMPLICIT NONE 4 | c ----------------------------------------------------------------- 5 | INTEGER Nstr,Pelt,Ptrvec 6 | DIMENSION Ptrvec(0:Pelt) 7 | c ----------------------------------------------------------------- 8 | Nstr=0 9 | Ptrvec(Nstr)=1 10 | Ptrvec(1)=1 11 | c ----------------------------------------------------------------- 12 | RETURN 13 | END 14 | -------------------------------------------------------------------------------- /tools/x13as_html/iscrfn.f: -------------------------------------------------------------------------------- 1 | **==iscrfn.f processed by SPAG 4.03F at 09:50 on 1 Mar 1994 2 | SUBROUTINE iscrfn(Oprn,Scr,Avec,Nelt,Pc,Cvec) 3 | IMPLICIT NONE 4 | c ------------------------------------------------------------------ 5 | INTEGER ADD,SUB,MULT,DIV 6 | PARAMETER(ADD=1,SUB=2,MULT=3,DIV=4) 7 | INTEGER Avec,Cvec,Oprn,Nelt,Pc,Scr 8 | DIMENSION Avec(Nelt),Cvec(Pc) 9 | c ------------------------------------------------------------------ 10 | INTEGER i 11 | c ------------------------------------------------------------------ 12 | DO i=1,Nelt 13 | IF(Oprn.eq.ADD)THEN 14 | Cvec(i)=Scr+Avec(i) 15 | c ------------------------------------------------------------------ 16 | ELSE IF(Oprn.eq.SUB)THEN 17 | Cvec(i)=Avec(i)-Scr 18 | c ------------------------------------------------------------------ 19 | ELSE IF(Oprn.eq.MULT)THEN 20 | Cvec(i)=Scr*Avec(i) 21 | c ------------------------------------------------------------------ 22 | ELSE IF(Oprn.eq.DIV)THEN 23 | Cvec(i)=Avec(i)/Scr 24 | END IF 25 | END DO 26 | c ------------------------------------------------------------------ 27 | RETURN 28 | END 29 | -------------------------------------------------------------------------------- /tools/x13as_html/isdate.f: -------------------------------------------------------------------------------- 1 | **==isdate.f processed by SPAG 4.03F at 09:50 on 1 Mar 1994 2 | LOGICAL FUNCTION isdate(Dat,Sp) 3 | IMPLICIT NONE 4 | c----------------------------------------------------------------------- 5 | c Check the date 6 | c----------------------------------------------------------------------- 7 | INTEGER Dat,Sp 8 | DIMENSION Dat(2) 9 | c ------------------------------------------------------------------ 10 | c BCM changed routine Oct 31, 1995 to allow for year zero. 11 | c ------------------------------------------------------------------ 12 | IF((Sp.gt.1.and.(Dat(2).lt.1.or.Dat(2).gt.Sp)).or.Dat(1).lt.0)THEN 13 | isdate=.false. 14 | ELSE 15 | isdate=.true. 16 | END IF 17 | c ------------------------------------------------------------------ 18 | RETURN 19 | END 20 | -------------------------------------------------------------------------------- /tools/x13as_html/isfals.f: -------------------------------------------------------------------------------- 1 | **==istrue.f processed by SPAG 4.03F at 09:50 on 1 Mar 1994 2 | LOGICAL FUNCTION isfals(Lsrs,L1,L2) 3 | c----------------------------------------------------------------------- 4 | c Check to see if there is at least one true element in an array 5 | c of logicals between two positions of the array. 6 | c----------------------------------------------------------------------- 7 | IMPLICIT NONE 8 | LOGICAL Lsrs(*) 9 | INTEGER i,L1,L2 10 | c----------------------------------------------------------------------- 11 | isfals=.false. 12 | DO i=L1,L2 13 | isfals=isfals.or.(.not.Lsrs(i)) 14 | IF(isfals)RETURN 15 | END DO 16 | c----------------------------------------------------------------------- 17 | RETURN 18 | END 19 | -------------------------------------------------------------------------------- /tools/x13as_html/ispos.f: -------------------------------------------------------------------------------- 1 | **==issame.f processed by SPAG 4.03F at 09:50 on 1 Mar 1994 2 | LOGICAL FUNCTION ispos(Lsrs,L1,L2) 3 | c----------------------------------------------------------------------- 4 | c Check to see if all the values of a double precision array 5 | c between pointers L1 and L2 are greater than zero. 6 | c----------------------------------------------------------------------- 7 | IMPLICIT NONE 8 | DOUBLE PRECISION Lsrs(*) 9 | INTEGER i,L1,L2 10 | c----------------------------------------------------------------------- 11 | ispos=.true. 12 | DO i=L1,L2 13 | IF(Lsrs(i).le.0D0)THEN 14 | ispos=.false. 15 | RETURN 16 | END IF 17 | END DO 18 | c----------------------------------------------------------------------- 19 | RETURN 20 | END 21 | -------------------------------------------------------------------------------- /tools/x13as_html/istrue.f: -------------------------------------------------------------------------------- 1 | **==istrue.f processed by SPAG 4.03F at 09:50 on 1 Mar 1994 2 | LOGICAL FUNCTION istrue(Lsrs,L1,L2) 3 | c----------------------------------------------------------------------- 4 | c Check to see if there is at least one true element in an array 5 | c of logicals between two positions of the array. 6 | c----------------------------------------------------------------------- 7 | IMPLICIT NONE 8 | LOGICAL Lsrs(*) 9 | INTEGER i,L1,L2 10 | c----------------------------------------------------------------------- 11 | istrue=.false. 12 | DO i=L1,L2 13 | istrue=istrue.or.Lsrs(i) 14 | IF(istrue)RETURN 15 | END DO 16 | c----------------------------------------------------------------------- 17 | RETURN 18 | END 19 | -------------------------------------------------------------------------------- /tools/x13as_html/lendp.f: -------------------------------------------------------------------------------- 1 | C Last change: BCM 29 Sep 97 9:48 am 2 | **==lendp.f processed by SPAG 4.03F at 09:50 on 1 Mar 1994 3 | SUBROUTINE lendp(X,Nx,Lenx) 4 | IMPLICIT NONE 5 | c----------------------------------------------------------------------- 6 | c Finds how many values have been input into x by finding the first 7 | c dnotst value working back through the array. Array must be initialized 8 | c with notset values (dnotst for double precision) using a 9 | c call setdp(dnotst,nx,x) call. 10 | c----------------------------------------------------------------------- 11 | INCLUDE 'notset.prm' 12 | INTEGER Nx,Lenx 13 | DOUBLE PRECISION X(*) 14 | c ------------------------------------------------------------------ 15 | LOGICAL dpeq 16 | EXTERNAL dpeq 17 | c ------------------------------------------------------------------ 18 | DO Lenx=Nx,1,-1 19 | IF(.not.dpeq(X(Lenx),DNOTST))GO TO 10 20 | END DO 21 | c ------------------------------------------------------------------ 22 | 10 RETURN 23 | END 24 | -------------------------------------------------------------------------------- /tools/x13as_html/level.prm: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c level - logical variable which defines those tables to be printed 3 | c for an X-13 run when a specific print level (none,brief, 4 | c default,alltables,all) is specified 5 | c----------------------------------------------------------------------- 6 | LOGICAL level 7 | DIMENSION level(NTBL,NLVL) 8 | -------------------------------------------------------------------------------- /tools/x13as_html/lgnrmc.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE lgnrmc(Nfcst,Fctunc,Fctse,Fctcor,Ltrans) 2 | IMPLICIT NONE 3 | c----------------------------------------------------------------------- 4 | c Subroutine to perform lognormal correction of forcasts/backcasts 5 | c Ltrans controls if forecast is to be transformed to original scale 6 | c----------------------------------------------------------------------- 7 | DOUBLE PRECISION PT5 8 | PARAMETER(PT5=0.5D0) 9 | c----------------------------------------------------------------------- 10 | INTEGER i,Nfcst 11 | DOUBLE PRECISION Fctunc(*),Fctse(*),Fctcor(*),corfac 12 | LOGICAL Ltrans 13 | c ------------------------------------------------------------------ 14 | c Compute correction factor 15 | c ------------------------------------------------------------------ 16 | DO i=1,Nfcst 17 | corfac=Fctse(i)*Fctse(i)*PT5 18 | IF(Ltrans)THEN 19 | Fctcor(i)=DEXP(corfac+Fctunc(i)) 20 | ELSE 21 | Fctcor(i)=corfac+Fctunc(i) 22 | END IF 23 | END DO 24 | c ------------------------------------------------------------------ 25 | RETURN 26 | END 27 | -------------------------------------------------------------------------------- /tools/x13as_html/lkhd.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c Allow aicc, bic and likelihood to be passed to other routines 3 | c BCM - January 1994, revised November 2000 4 | c----------------------------------------------------------------------- 5 | DOUBLE PRECISION Aic,Aicc,Bic,Bic2,Hnquin,Olkhd,Eic 6 | COMMON /lkhd / Aic,Aicc,Bic,Bic2,Hnquin,Olkhd,Eic 7 | -------------------------------------------------------------------------------- /tools/x13as_html/lkshnk.f: -------------------------------------------------------------------------------- 1 | C Last change: BCM 6 May 2003 10:28 am 2 | DOUBLE PRECISION FUNCTION lkshnk(S1,S2,Sig) 3 | IMPLICIT NONE 4 | C----------------------------------------------------------------------- 5 | c Compute estimator of likelihood associated with S1 given that the 6 | c true mean is S2, with variance estimated by Sig. 7 | c This is used in the "local" method of generating shrinkage 8 | c estimates developed in the paper "Shrinkage Est. of Time Series 9 | c Seasonal Factors and their Effect on Forecasting Accuracy", 10 | c Miller & Williams (2003) 11 | C----------------------------------------------------------------------- 12 | DOUBLE PRECISION PI,ONE,TWO,MONE 13 | PARAMETER(PI=3.14159265358979d0,ONE=1D0,TWO=2D0,MONE=-1D0) 14 | C----------------------------------------------------------------------- 15 | DOUBLE PRECISION S1,S2,Sig 16 | C----------------------------------------------------------------------- 17 | lkshnk = (ONE/dsqrt(Sig*TWO*PI))* 18 | & dexp((MONE/TWO)*(((S1-S2)*(S1-S2))/Sig)) 19 | RETURN 20 | END 21 | -------------------------------------------------------------------------------- /tools/x13as_html/logar.f: -------------------------------------------------------------------------------- 1 | C Last change: BCM 26 Apr 1998 2:46 pm 2 | **==logar.f processed by SPAG 4.03F at 09:51 on 1 Mar 1994 3 | SUBROUTINE logar(X,I,J) 4 | IMPLICIT NONE 5 | C*** Start of declarations inserted by SPAG 6 | DOUBLE PRECISION tmp,X 7 | INTEGER I,J,k 8 | C*** End of declarations inserted by SPAG 9 | DIMENSION X(J) 10 | DO k=I,J 11 | tmp=X(k) 12 | X(k)=dlog(tmp) 13 | END DO 14 | RETURN 15 | END 16 | 17 | -------------------------------------------------------------------------------- /tools/x13as_html/logdet.f: -------------------------------------------------------------------------------- 1 | **==logdet.f processed by SPAG 4.03F at 09:51 on 1 Mar 1994 2 | SUBROUTINE logdet(Ap,N,Lgdt) 3 | c----------------------------------------------------------------------- 4 | c Returns the log of the determinate of a packed triangular matrix 5 | c----------------------------------------------------------------------- 6 | IMPLICIT NONE 7 | INTEGER i,ielt,N 8 | DOUBLE PRECISION Ap(*),Lgdt 9 | c ------------------------------------------------------------------ 10 | Lgdt=0D0 11 | ielt=0 12 | c ------------------------------------------------------------------ 13 | DO i=1,N 14 | ielt=ielt+i 15 | Lgdt=Lgdt+2D0*log(Ap(ielt)) 16 | END DO 17 | c ------------------------------------------------------------------ 18 | RETURN 19 | END 20 | -------------------------------------------------------------------------------- /tools/x13as_html/logtrace.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /LogTrace/ ... 3 | integer ntrace 4 | character*80 TrTitle(50000) 5 | real*8 Dstdres(50000) 6 | common /logtrace/ Dstdres,TrTitle,ntrace 7 | -------------------------------------------------------------------------------- /tools/x13as_html/lstpth.f: -------------------------------------------------------------------------------- 1 | C Last change: BCM 18 Nov 97 1:49 pm 2 | INTEGER FUNCTION lstpth(Filnam,Nfil) 3 | IMPLICIT NONE 4 | c----------------------------------------------------------------------- 5 | c Returns the position of the last character in the path of the file 6 | c name given in Filnam (returns 0 if there is no file name). 7 | c----------------------------------------------------------------------- 8 | INCLUDE 'lex.i' 9 | CHARACTER Filnam*(*) 10 | INTEGER jchr,Nfil 11 | c----------------------------------------------------------------------- 12 | DO lstpth=Nfil,1,-1 13 | jchr=ichar(Filnam(lstpth:lstpth)) 14 | cdos backslash for directory 15 | cdos IF(jchr.eq.COLON.or.jchr.eq.BSLASH)GO TO 10 16 | cunix forward slash for directory 17 | IF(jchr.eq.SLASH.or.jchr.eq.COLON)GO TO 10 18 | END DO 19 | c ------------------------------------------------------------------ 20 | lstpth=0 21 | 10 RETURN 22 | END 23 | -------------------------------------------------------------------------------- /tools/x13as_html/lzero.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c Kh2 - duplicate of holiday adjustment indicator variable 3 | c L0 - pointer to first observation of the first span in a sliding 4 | c spans, revisions history analysis 5 | c Lsp - pointer to first observation of the current span in a 6 | c sliding spans, revisions history analysis 7 | c Ly0 - first year of original span 8 | c Axhol - Logical variable which determines if X-11 holiday 9 | c adjustment was used to adjust the series 10 | c----------------------------------------------------------------------- 11 | INTEGER Kh2,L0,Ly0,Lsp 12 | LOGICAL Axhol 13 | COMMON /lzero / L0,Ly0,Lsp,Kh2,Axhol 14 | 15 | -------------------------------------------------------------------------------- /tools/x13as_html/matrix1.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /matrix1/ ... 3 | character Pat,Tmcs,Ana,Sf,Cvar,Ccc, 4 | $ CmtTc,CmtS,CmtIR,CmtTs,CmtSA 5 | integer Nmmu,Nmp,Nmd,Nmq,Nmbp,Nmbd,Nmbq 6 | real*8 Sd 7 | common /matrix1r/ Sd 8 | common /matrix1i/ Nmmu,Nmp,Nmd,Nmq,Nmbp,Nmbd,Nmbq 9 | common /matrix1c/ Cvar,Ccc,CmtTc,CmtS,CmtIR,CmtTs,CmtSA, 10 | $ Pat,Tmcs,Ana,Sf 11 | -------------------------------------------------------------------------------- /tools/x13as_html/maxvec.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE maxvec(Dx,N,Mxabvl) 2 | c----------------------------------------------------------------------- 3 | c maxvec.f, Release 1, Subroutine Version 1.1, Modified 09 Feb 1995. 4 | c----------------------------------------------------------------------- 5 | c Find maximum magnitude of double precision dx. 6 | c----------------------------------------------------------------------- 7 | IMPLICIT NONE 8 | INTEGER i,N 9 | DOUBLE PRECISION Dx(*),Mxabvl,xmag 10 | c ----------------------------------------------------------------- 11 | Mxabvl=0 12 | IF(N.le.0)RETURN 13 | c----------------------------------------------------------------------- 14 | c Code for increments equal to 1. 15 | c----------------------------------------------------------------------- 16 | DO i=1,N 17 | xmag=abs(Dx(i)) 18 | IF(xmag.gt.Mxabvl)Mxabvl=xmag 19 | END DO 20 | c ----------------------------------------------------------------- 21 | RETURN 22 | END 23 | -------------------------------------------------------------------------------- /tools/x13as_html/mdldg.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | DOUBLE PRECISION Sfpv,Sfval,Usfpv,Usfval,Tdfpv,Tdfval,Utdfpv, 3 | & Utdfvl,Treg(PB) 4 | c----------------------------------------------------------------------- 5 | COMMON /cmdldg/ Treg,Sfpv,Sfval,Usfpv,Usfval,Tdfpv,Tdfval,Utdfpv, 6 | & Utdfvl 7 | -------------------------------------------------------------------------------- /tools/x13as_html/mdlinp.f: -------------------------------------------------------------------------------- 1 | C Last change: BCM 10 Feb 1999 4:19 pm 2 | **==mdlinp.f processed by SPAG 4.03F at 15:51 on 14 Apr 1994 3 | SUBROUTINE mdlinp(File,Inptok) 4 | IMPLICIT NONE 5 | c ----------------------------------------------------------------- 6 | CHARACTER File*(*) 7 | LOGICAL Inptok,ldmy,rngbuf 8 | EXTERNAL rngbuf 9 | c ----------------------------------------------------------------- 10 | INCLUDE 'lex.i' 11 | INCLUDE 'error.cmn' 12 | c ----------------------------------------------------------------- 13 | CALL fopen(File,'model file for automatic model selection','OLD', 14 | & Inputx,Inptok) 15 | IF(.not.Inptok)RETURN 16 | REWIND(Inputx) 17 | Lineno=0 18 | Lineln=0 19 | ldmy=rngbuf(1,Lineno,Linex,Lineln) 20 | IF(.not.ldmy.or.Lfatal)RETURN 21 | Pos(PLINE)=0 22 | Pos(PCHAR)=1 23 | Lstpos(PLINE)=0 24 | Lstpos(PCHAR)=1 25 | Errpos(PLINE)=0 26 | Errpos(PCHAR)=1 27 | CALL lex() 28 | c ----------------------------------------------------------------- 29 | RETURN 30 | END 31 | -------------------------------------------------------------------------------- /tools/x13as_html/mdlint.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE mdlint() 2 | IMPLICIT NONE 3 | c----------------------------------------------------------------------- 4 | c Initialize the parameters and lag vectors. 5 | c----------------------------------------------------------------------- 6 | INCLUDE 'srslen.prm' 7 | INCLUDE 'model.prm' 8 | INCLUDE 'model.cmn' 9 | INCLUDE 'mdldat.cmn' 10 | c ------------------------------------------------------------------ 11 | INTEGER PACM 12 | DOUBLE PRECISION ZERO 13 | PARAMETER(PACM=(PLEN+2*PORDER)*PARIMA,ZERO=0D0) 14 | c ------------------------------------------------------------------ 15 | CALL intlst(POPR,Opr,Nopr) 16 | CALL intlst(POPR,Oprptr,Noprtl) 17 | CALL setchr(' ',POPRCR*POPR,Oprttl) 18 | CALL intlst(PMDL,Mdl,Nmdl) 19 | Mdl(AR)=1 20 | Mdl(MA)=1 21 | CALL setlg(.false.,PARIMA,Arimaf) 22 | CALL setint(0,PARIMA,Arimal) 23 | CALL setdp(ZERO,PARIMA,Arimap) 24 | CALL setdp(ZERO,PACM,Armacm) 25 | Lndtcv=ZERO 26 | Mxarlg=0 27 | Mxdflg=0 28 | Mxmalg=0 29 | Nseadf=0 30 | Lseadf=.false. 31 | c----------------------------------------------------------------------- 32 | RETURN 33 | END 34 | -------------------------------------------------------------------------------- /tools/x13as_html/mdlsvl.i: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c Table pointer variables used for svltbl are of the form LSL 3 | c where the types are 4 | c----------------------------------------------------------------------- 5 | c aic tests ATS 6 | c automatic model selected AMD 7 | c AIC AIC 8 | c BIC BIC 9 | c Forecast error diagnostic AFC 10 | c----------------------------------------------------------------------- 11 | INTEGER LSLTRN,LSLAMD,LSLADF,LSLB5M,LSLMU,LSLFUR,LSLALA,LSLAMX, 12 | & LSLAIC,LSLACC,LSLBIC,LSLHQ,LSLEIC,LSLAFC,LSLRTS,LSLALE, 13 | & LSLTST,LSLCTS,LSLAOT,LSLNRM,LSLSAC,LSLLBQ,LSLSFT,LSLTFT, 14 | & LSLCDW,LSLCFR,LSLALC 15 | PARAMETER( 16 | & LSLTRN= 1,LSLAMD= 2,LSLADF= 3,LSLB5M= 4,LSLMU= 5, 17 | & LSLFUR= 6,LSLALA= 7,LSLAMX= 8,LSLAIC= 9,LSLACC= 10, 18 | & LSLBIC= 11,LSLHQ= 12,LSLEIC= 13,LSLAFC= 14,LSLRTS= 15, 19 | & LSLALE= 16,LSLTST= 17,LSLCTS= 18,LSLAOT= 19,LSLNRM= 20, 20 | & LSLSAC= 21,LSLLBQ= 22,LSLSFT= 24,LSLTFT= 25,LSLCDW= 26, 21 | & LSLCFR= 27,LSLALC= 28) 22 | -------------------------------------------------------------------------------- /tools/x13as_html/meancra.f: -------------------------------------------------------------------------------- 1 | **==meancra.f processed by SPAG 6.05Fc at 12:31 on 12 Oct 2004 2 | 3 | SUBROUTINE MEANCRA(A1x,Aty,Rtz,Modlid,Mq,Ny) 4 | IMPLICIT NONE 5 | **--MEANCRA5 6 | C 7 | C*** Start of declarations rewritten by SPAG 8 | C 9 | C Dummy arguments 10 | C 11 | INTEGER Modlid,Mq,Ny 12 | REAL*8 A1x(*),Aty(*),Rtz(*) 13 | C 14 | C Local variables 15 | C 16 | INTEGER i,j,k 17 | REAL*8 tt 18 | C 19 | C*** End of declarations rewritten by SPAG 20 | C 21 | 22 | C ----------- ATY IS D11 23 | 24 | c **** Start of Executable Program 25 | 26 | IF (Modlid.EQ.0) THEN 27 | DO i=1,Ny 28 | tt=A1x(i)/Aty(i)-1D0 29 | k=Mq*(i-1) 30 | DO j=1,Mq 31 | Rtz(k+j)=tt 32 | END DO 33 | END DO 34 | ELSE 35 | DO i=1,Ny 36 | tt=A1x(i)-Aty(i) 37 | k=Mq*(i-1) 38 | 39 | DO j=1,Mq 40 | Rtz(k+j)=tt/Mq 41 | END DO 42 | END DO 43 | END IF 44 | END 45 | -------------------------------------------------------------------------------- /tools/x13as_html/metadata.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c common block for user defined metadata 3 | c----------------------------------------------------------------------- 4 | CHARACTER Keystr*(PLMETA),Valstr*(PLMETA) 5 | LOGICAL Hvmtdt 6 | INTEGER Keyptr,Nkey,Valptr,Nval 7 | DIMENSION Keyptr(0:PMTDAT),Valptr(0:PMTDAT) 8 | c----------------------------------------------------------------------- 9 | COMMON /cmtdat/ Keyptr,Nkey,Valptr,Nval,Hvmtdt 10 | COMMON /cmtdic/ Keystr,Valstr 11 | c----------------------------------------------------------------------- 12 | -------------------------------------------------------------------------------- /tools/x13as_html/metadata.prm: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c parameters for user defined metadata 3 | c----------------------------------------------------------------------- 4 | c PMTDAT - maximum number of metadata values 5 | c PLMETA - maximum length of characters in metadata data dictionary 6 | c----------------------------------------------------------------------- 7 | INTEGER PMTDAT,PLMETA 8 | PARAMETER(PMTDAT=20,PLMETA=2000) 9 | -------------------------------------------------------------------------------- /tools/x13as_html/min.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /min/ ... 3 | real*8 START,STEP,DSTOP 4 | common /cmin/ START,STEP,DSTOP 5 | -------------------------------------------------------------------------------- /tools/x13as_html/missng.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c Missng - Logical variable which indicates if a missing value has 3 | c been found in the series 4 | c Misind - Logical vector of length PLEN which indicates if 5 | c observation t is a missing value 6 | c----------------------------------------------------------------------- 7 | LOGICAL Missng 8 | c----------------------------------------------------------------------- 9 | c Mvcode - code for missing values (default -99999D0) 10 | c Mvval - replacement value for missing values (default 1000000000) 11 | c---------------------------------------------------------------------- 12 | DOUBLE PRECISION Mvcode,Mvval 13 | c---------------------------------------------------------------------- 14 | COMMON /missvl/ Mvcode,Mvval,Missng 15 | 16 | -------------------------------------------------------------------------------- /tools/x13as_html/mkmdsx.f: -------------------------------------------------------------------------------- 1 | C Last change: BCM 4 Mar 2008 3:46 pm 2 | DOUBLE PRECISION FUNCTION mkmdsx(Sxx,Nfreq,Ldecbl) 3 | IMPLICIT NONE 4 | c----------------------------------------------------------------------- 5 | INTEGER Nfreq,n1 6 | DOUBLE PRECISION Sxx 7 | LOGICAL Ldecbl 8 | DIMENSION Sxx(*) 9 | c----------------------------------------------------------------------- 10 | IF(mod(Nfreq,2).eq.0)THEN 11 | n1=Nfreq/2 12 | IF(Ldecbl)THEN 13 | mkmdsx=(Sxx(n1)+Sxx(n1+1))/2D0 14 | ELSE 15 | mkmdsx=10D0**((log10(Sxx(n1))+log10(Sxx(n1+1)))/2D0) 16 | END IF 17 | ELSE 18 | n1=(Nfreq+1)/2 19 | mkmdsx=Sxx(n1) 20 | END IF 21 | c----------------------------------------------------------------------- 22 | RETURN 23 | END -------------------------------------------------------------------------------- /tools/x13as_html/models.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /models/ ... 3 | integer NADJS,NCHCYC,NCYCS,NTHETC,NTOTD,NTHETP,QSTAR0,NCHIS,NPSI, 4 | $ NPSIS,NTHETS,NTHADJ 5 | real*8 CHI(8),CHIS(17),CHINS(8),THSTR0(40),THETP(8),PSI(27), 6 | $ PSIS(16),PSINS(27),THETS(27),THADJ(32),ADJS(17),ADJNS(8), 7 | $ CHCYC(20),CYCS(17),CYC(17),CYCNS(5),THETC(32),TOTDEN(40) 8 | common /models/ CHI,CHIS,CHINS,THSTR0,THETP,PSI,PSIS,PSINS,THETS, 9 | $ THADJ,ADJS,ADJNS,CHCYC,CYCS,CYC,CYCNS,THETC, 10 | $ TOTDEN,NADJS,NCHCYC,NCYCS,NTHETC,NTOTD,NTHETP, 11 | $ QSTAR0,NCHIS,NPSI,NPSIS,NTHETS,NTHADJ 12 | -------------------------------------------------------------------------------- /tools/x13as_html/mq3.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c Pcdif - label text : "differences" if additive adjustment, else 3 | c "percent change" 4 | c Rad - label text : "differences" if additive adjustment, else 5 | c "ratios" 6 | c Moqu - label text : "month" if monthly data, "quarter" if not 7 | c Qm - label text : "monthly" if monthly data, "quarterly" if not 8 | c Mqcd - label text : "mcd" if monthly data, "qcd" if not 9 | c----------------------------------------------------------------------- 10 | CHARACTER Pcdif*(15),Rad*(11),Moqu*(7),Qm*(9),Mqcd*(3) 11 | c----------------------------------------------------------------------- 12 | COMMON /mq3 / Pcdif,Rad,Moqu,Qm,Mqcd 13 | -------------------------------------------------------------------------------- /tools/x13as_html/mulref.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE mulref(Nrxy,Fac,Tmp,Xdev,Xvec,Xval,Same) 2 | IMPLICIT NONE 3 | c----------------------------------------------------------------------- 4 | c adjusts X-11 Regression factors by dividing either by the 5 | c scalar Xval or the array Xvec. 6 | c----------------------------------------------------------------------- 7 | DOUBLE PRECISION Fac,Tmp,Xvec,Xval 8 | LOGICAL Same 9 | INTEGER irow,Nrxy,j,Xdev 10 | DIMENSION Fac(*),Tmp(*),Xvec(*) 11 | c----------------------------------------------------------------------- 12 | IF(Xval.gt.0)THEN 13 | DO irow=1,Nrxy 14 | IF(Same)THEN 15 | Fac(irow)=Tmp(irow)/Xval 16 | ELSE 17 | Fac(irow)=Fac(irow)+Tmp(irow)/Xval 18 | END IF 19 | END DO 20 | ELSE 21 | DO irow=1,Nrxy 22 | j=irow+Xdev-1 23 | IF(Same)THEN 24 | Fac(irow)=Tmp(irow)/Xvec(j) 25 | ELSE 26 | Fac(irow)=Fac(irow)+Tmp(irow)/Xvec(j) 27 | END IF 28 | END DO 29 | END IF 30 | c----------------------------------------------------------------------- 31 | RETURN 32 | END 33 | -------------------------------------------------------------------------------- /tools/x13as_html/mult.f: -------------------------------------------------------------------------------- 1 | **==mult.f processed by SPAG 6.05Fc at 12:31 on 12 Oct 2004 2 | 3 | SUBROUTINE MATMLT(A,B,C,M,Ip,Iq,Ia,Ib,Ic) 4 | IMPLICIT NONE 5 | **--MULT5 6 | C 7 | C*** Start of declarations rewritten by SPAG 8 | C 9 | C Dummy arguments 10 | C 11 | INTEGER*4 Ia,Ib,Ic,Ip,Iq,M 12 | REAL*8 A(Ia,*),B(Ib,*),C(Ic,*) 13 | C 14 | C Local variables 15 | C 16 | INTEGER*4 i,ir,is 17 | REAL*8 sum 18 | C 19 | C*** End of declarations rewritten by SPAG 20 | C 21 | 22 | c **** Start of Executable Program 23 | 24 | C a(m,p)*b(p,q) = c(m,q) 25 | 26 | DO ir=1,M 27 | DO is=1,Iq 28 | sum=0.0D0 29 | DO i=1,Ip 30 | sum=sum+(A(ir,i)*B(i,is)) 31 | END DO 32 | C(ir,is)=sum 33 | END DO 34 | END DO 35 | END 36 | -------------------------------------------------------------------------------- /tools/x13as_html/newmdl.cmn: -------------------------------------------------------------------------------- 1 | C----------------------------------------------------------------------- 2 | c Variables for generalized versions of the airline model 3 | C----------------------------------------------------------------------- 4 | DOUBLE PRECISION Aparm,Bparm,Cparm 5 | INTEGER Newmdl 6 | COMMON /newcmn/ Aparm,Bparm,Cparm,Newmdl 7 | C----------------------------------------------------------------------- 8 | -------------------------------------------------------------------------------- /tools/x13as_html/notset.prm: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c Parameter file for all the notset values. 3 | c----------------------------------------------------------------------- 4 | c Name Type Description 5 | c----------------------------------------------------------------------- 6 | c CNOTST c Parameter, '?', signifies character variable not input 7 | c to namelist 8 | c DNOTST d Parameter -999.0d-0, signifies value not input 9 | c NOTSET i Parameter signifies integer variable not input to namelist 10 | c SNOTST r Parameter -999.0, signifies single precision value not 11 | c input 12 | c----------------------------------------------------------------------- 13 | CHARACTER CNOTST*1 14 | INTEGER NOTSET 15 | c REAL SNOTST 16 | DOUBLE PRECISION DNOTST 17 | PARAMETER (CNOTST='?',NOTSET=-32767,DNOTST=-999.0d0) 18 | c PARAMETER (SNOTST=-999.0) 19 | 20 | -------------------------------------------------------------------------------- /tools/x13as_html/nsums.i: -------------------------------------------------------------------------------- 1 | INTEGER nSeatsSer,noTratadas,wSposBphi,wSstochTD,wSstatseas 2 | DOUBLE PRECISION wSrmod,wSxl 3 | common /cnsums/wSrmod,wSxl,nSeatsSer,noTratadas,wSposBphi, 4 | $ wSstochTD,wSstatseas 5 | -------------------------------------------------------------------------------- /tools/x13as_html/orisrs.cmn: -------------------------------------------------------------------------------- 1 | DOUBLE PRECISION Stcsi,Sto,Stoap,Stopp,Stocal 2 | DIMENSION Stcsi(PLEN),Sto(PLEN),Stoap(PLEN),Stopp(PLEN), 3 | & Stocal(PLEN) 4 | COMMON /orisrs/ Stcsi,Sto,Stoap,Stopp,Stocal 5 | -------------------------------------------------------------------------------- /tools/x13as_html/otlrev.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c Otrttl - data dictionary containing the names of the outliers 3 | c deleted during the revisions/sliding spans analysis 4 | c Botr - parameter values for the outliers deleted during the 5 | c revisions/sliding spans analysis 6 | c Otrptr - pointer vector for data dictionary for outliers deleted 7 | c during the revisions/sliding spans analysis 8 | c Notrtl - number of outliers deleted during the revisions/sliding 9 | c spans analysis 10 | c----------------------------------------------------------------------- 11 | CHARACTER Otrttl*(PCOLCR*PB) 12 | LOGICAL Fixotr 13 | DOUBLE PRECISION Botr 14 | INTEGER Otrptr,Notrtl 15 | DIMENSION Otrptr(0:PB),Botr(PB),Fixotr(PB) 16 | c----------------------------------------------------------------------- 17 | COMMON /Otrev/Botr,Otrptr,Notrtl,Fixotr,Otrttl 18 | c----------------------------------------------------------------------- 19 | 20 | -------------------------------------------------------------------------------- /tools/x13as_html/otxrev.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c Otxttl - data dictionary containing the names of the outliers 3 | c deleted during the revisions/sliding spans analysis 4 | c Botx - parameter values for the outliers deleted during the 5 | c revisions/sliding spans analysis 6 | c Otxptr - pointer vector for data dictionary for outliers deleted 7 | c during the revisions/sliding spans analysis 8 | c Notxtl - number of outliers deleted during the revisions/sliding 9 | c spans analysis 10 | c----------------------------------------------------------------------- 11 | CHARACTER Otxttl*(PCOLCR*PB) 12 | LOGICAL Fixotx 13 | DOUBLE PRECISION Botx 14 | INTEGER Otxptr,Notxtl 15 | DIMENSION Otxptr(0:PB),Botx(PB),Fixotx(PB) 16 | c----------------------------------------------------------------------- 17 | COMMON /Otxrev/Botx,Otxptr,Notxtl,Fixotx,Otxttl 18 | c----------------------------------------------------------------------- 19 | 20 | -------------------------------------------------------------------------------- /tools/x13as_html/peaks.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /peaks/ ... 3 | character picosSA(7)*2,picosTr(7)*2,picosIr(7)*2,picosRes(7)*2 4 | common /peaks/ picosSA,picosTr,picosIr,picosRes 5 | -------------------------------------------------------------------------------- /tools/x13as_html/picktd.cmn: -------------------------------------------------------------------------------- 1 | INTEGER Tdzero,Tddate,Lnzero,Lndate 2 | c----------------------------------------------------------------------- 3 | c Picktd - logical scalar which indicates that "td" was selected 4 | c as one of the trading day regressors 5 | c Lrgmtd - logical scalar which indicates that change of regime 6 | c trading day regressors are contained in the current 7 | c model being processed 8 | c Lrgmln - logical scalar which indicates that length of period 9 | c (length of month, quarter, or leap year) change of 10 | c regime regressor is contained in the current model being 11 | c processed 12 | c----------------------------------------------------------------------- 13 | LOGICAL Picktd,Lrgmtd,Fulltd,Lrgmln,Fullln,Fulllp 14 | c----------------------------------------------------------------------- 15 | DIMENSION Tddate(2),Lndate(2) 16 | c----------------------------------------------------------------------- 17 | COMMON /cpktd / Tdzero,Tddate,Lnzero,Lndate,Picktd,Lrgmtd,Fulltd, 18 | & Lrgmln,Fullln,Fulllp 19 | -------------------------------------------------------------------------------- /tools/x13as_html/pinno.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /pinno/ ... 3 | integer M,IQ 4 | common /pinno/ M,IQ 5 | -------------------------------------------------------------------------------- /tools/x13as_html/polynom.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x13org/x13binary/c7d0198181c9f09353da0136f5c18da6b0d40999/tools/x13as_html/polynom.f -------------------------------------------------------------------------------- /tools/x13as_html/polynom.i: -------------------------------------------------------------------------------- 1 | c File Polynom.i 2 | integer MaxPol,MaxPolDim,MaxBcharLength 3 | Parameter(MaxPol=5,MaxPolDim=35,MaxBcharLength=5) 4 | -------------------------------------------------------------------------------- /tools/x13as_html/preadtr.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /preadtr/ ... 3 | integer NOUTR,NOUIR,NEAST,NPATD,NPAREG,TRAMO,KUNITS,SUNITS 4 | integer NOUS,NDS 5 | integer NEFF(0:7) 6 | real*8 TRAM(MPKP),PAOUTR(MPKP),PAOUIR(MPKP),PAEAST(MPKP), 7 | $ PAOUS(MPKP),PATD(MPKP),PAREG(MPKP,0:7),TSE(KL), 8 | $ TramLin(MPKP) 9 | real*8 DETSEAS(12) 10 | common /preadtr/ TRAM,PAOUTR,PAOUS,PAOUIR,PAEAST, 11 | $ PATD,PAREG,TSE,DETSEAS,TramLin 12 | common /ipradtr/ NOUTR,NOUIR,NOUS,NEAST,NPATD,NPAREG,TRAMO, 13 | $ NDS,KUNITS,SUNITS,NEFF 14 | -------------------------------------------------------------------------------- /tools/x13as_html/priadj.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c Usrtad : Temporary Prior adjustment factors 3 | c Usrpad : Permanent Prior adjustment factors 4 | c----------------------------------------------------------------------- 5 | DOUBLE PRECISION Usrtad,Usrpad 6 | c----------------------------------------------------------------------- 7 | DIMENSION Usrtad(PLEN),Usrpad(PLEN) 8 | c----------------------------------------------------------------------- 9 | COMMON /upradj/ Usrtad,Usrpad 10 | 11 | -------------------------------------------------------------------------------- /tools/x13as_html/prior.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c Priadj : Indicator variable indicating predefined adjustments 3 | c (0=none,1=lom,2=loq,3=lpyear) 4 | c Percnt : Indicator vector indicating the mode of the adjustment 5 | c factors (0=percent,1=ratio,2=diff) 6 | c Prtype : Vector containing type of Prior Adjustment Factor 7 | c (1=temporary, 2=permanent) 8 | c Nprtyp : Number of sets of prior adjustment factors 9 | c Kfmt : Indicator variable indicating prior adjustment is done 10 | c (0=no,1=yes) 11 | c----------------------------------------------------------------------- 12 | INTEGER Kfmt,Priadj,Percnt,Prtype,Nprtyp 13 | LOGICAL Lpradj,Lprntr 14 | c----------------------------------------------------------------------- 15 | DIMENSION Prtype(PNAD),Percnt(PNAD) 16 | c----------------------------------------------------------------------- 17 | COMMON /pradj/ Priadj,Percnt,Prtype,Nprtyp,Kfmt,Lpradj,Lprntr 18 | -------------------------------------------------------------------------------- /tools/x13as_html/prior.prm: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c PNAD : Number of types of prior adjustment factors. 3 | c----------------------------------------------------------------------- 4 | INTEGER PNAD 5 | PARAMETER(PNAD=2) 6 | -------------------------------------------------------------------------------- /tools/x13as_html/prittl.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c Adjttl : Title for the prior adjustment factors 3 | c Nadjcr : Number of character in title Adjttl 4 | c----------------------------------------------------------------------- 5 | CHARACTER Adjttl*(PSRSCR) 6 | INTEGER Nadjcr 7 | c----------------------------------------------------------------------- 8 | COMMON /prittl/ Nadjcr,Adjttl 9 | 10 | -------------------------------------------------------------------------------- /tools/x13as_html/prtous.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /prtous/ ... 3 | integer xotab,ptab,ntab,stab,caltab,uctab,patab,cytab, 4 | $ ltptab,ertab,rg0tab,rgsatab,stptab,stntab, 5 | $ utab,ctab,rtptab,rtsatab 6 | common /prtous/ xotab,ptab,ntab,stab,caltab,uctab,patab,cytab, 7 | $ ltptab,ertab,rg0tab,rgsatab,stptab,stntab,utab,ctab, 8 | $ rtptab,rtsatab 9 | -------------------------------------------------------------------------------- /tools/x13as_html/putstr.f: -------------------------------------------------------------------------------- 1 | C Last change: BCM 2 Apr 98 1:01 pm 2 | **==putstr.f processed by SPAG 4.03F at 09:52 on 1 Mar 1994 3 | SUBROUTINE putstr(Str,Pstr,Chrvec,Ptrvec,Nstr) 4 | IMPLICIT NONE 5 | c ----------------------------------------------------------------- 6 | INCLUDE 'error.cmn' 7 | c ----------------------------------------------------------------- 8 | CHARACTER Chrvec*(*),Str*(*) 9 | INTEGER Nstr,Pstr,Ptrvec 10 | DIMENSION Ptrvec(0:Pstr) 11 | c ----------------------------------------------------------------- 12 | CALL insptr(.true.,len(Str),Nstr+1,Pstr,len(Chrvec),Ptrvec,Nstr) 13 | c ----------------------------------------------------------------- 14 | IF(.not.Lfatal)Chrvec(Ptrvec(Nstr-1):Ptrvec(Nstr)-1)=Str 15 | c ----------------------------------------------------------------- 16 | RETURN 17 | c ----------------------------------------------------------------- 18 | END 19 | -------------------------------------------------------------------------------- /tools/x13as_html/quadsd.f: -------------------------------------------------------------------------------- 1 | **==quadsd.f processed by SPAG 4.03F at 09:52 on 1 Mar 1994 2 | SUBROUTINE quadsd(Nn,U,V,P,Q,A,B) 3 | IMPLICIT NONE 4 | C ********************************************************************** 5 | C * * 6 | C * DIVIDES P BY THE QUADRATIC 1,U,V PLACING THE QUOTIENT IN Q AND * 7 | C * THE REMAINDER IN A,B * 8 | C * * 9 | C ********************************************************************** 10 | INTEGER i,Nn 11 | DOUBLE PRECISION P(Nn),Q(Nn),U,V,A,B,c 12 | B=P(1) 13 | Q(1)=B 14 | A=P(2)-U*B 15 | Q(2)=A 16 | DO i=3,Nn 17 | c=P(i)-U*A-V*B 18 | Q(i)=c 19 | B=A 20 | A=c 21 | END DO 22 | RETURN 23 | END 24 | -------------------------------------------------------------------------------- /tools/x13as_html/resid2.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE resid2(Xy,Nr,Nc,Nb,Xdev,B,Rsd,Sti) 2 | IMPLICIT NONE 3 | c----------------------------------------------------------------------- 4 | c Returns the residuals from an X-11 regression model for a 5 | c multiplicative seasonal adjustment when both X-11 and Holiday 6 | c regressors are used. 7 | c----------------------------------------------------------------------- 8 | INCLUDE 'srslen.prm' 9 | INCLUDE 'xtdtyp.cmn' 10 | c----------------------------------------------------------------------- 11 | DOUBLE PRECISION Xy,B,Rsd,tmp,Sti 12 | INTEGER icol,irow,ir2,Nr,Nc,Nb,Xdev 13 | DIMENSION B(*),Rsd(*),tmp(PLEN),Xy(Nc*Nr),Sti(PLEN) 14 | c----------------------------------------------------------------------- 15 | DO icol=1,Nb 16 | CALL daxpy(Nr,B(icol),Xy(icol),Nc,tmp,1) 17 | END DO 18 | c----------------------------------------------------------------------- 19 | DO irow=1,Nr 20 | ir2=irow+Xdev-1 21 | Rsd(irow)=(Xnstar(ir2)*Sti(ir2))-(Xn(ir2)+tmp(irow))/Kvec(irow) 22 | END DO 23 | c----------------------------------------------------------------------- 24 | RETURN 25 | END 26 | -------------------------------------------------------------------------------- /tools/x13as_html/rev.prm: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c PREV - maximum number of observations that can be analyzed in a 3 | c revisions history analysis 4 | c PFCLAG - maximum number of forecast lags that can be analyzed in a 5 | c revisions history analysis 6 | c PREVY - maximum number of years that can be analyzed in a 7 | c revisions history analysis 8 | c PTARGT - maximum number of targets that can be analyzed in a 9 | c revisions history analysis 10 | c----------------------------------------------------------------------- 11 | INTEGER PREV, PFCLAG, PREVY, PTARGT 12 | PARAMETER(PREV=PLEN-20,PFCLAG=4,PREVY=PYRS-5,PTARGT=5) 13 | 14 | -------------------------------------------------------------------------------- /tools/x13as_html/revrse.f: -------------------------------------------------------------------------------- 1 | **==revrse.f processed by SPAG 4.03F at 09:53 on 1 Mar 1994 2 | SUBROUTINE revrse(Frwd,Nr,Nc,Bkwd) 3 | IMPLICIT NONE 4 | c----------------------------------------------------------------------- 5 | c Reverses the rows of x, an nr by nc matrix. Note that we go 6 | c halfway through the series. 7 | c----------------------------------------------------------------------- 8 | INTEGER Nr,Nc,hlf,i,j,backi 9 | DOUBLE PRECISION Frwd(Nc,Nr),Bkwd(Nc,Nr),tmp 10 | c----------------------------------------------------------------------- 11 | c If the number of rows is even then exchange half the rows, hlf=nr/2. 12 | c If the number of rows is odd make sure the middle row is written also, 13 | c hlf=nr/2+1. 14 | c----------------------------------------------------------------------- 15 | hlf=(Nr+1)/2 16 | DO i=1,hlf 17 | backi=Nr-i+1 18 | c ------------------------------------------------------------------ 19 | DO j=1,Nc 20 | tmp=Frwd(j,i) 21 | Bkwd(j,i)=Frwd(j,backi) 22 | Bkwd(j,backi)=tmp 23 | END DO 24 | END DO 25 | c ------------------------------------------------------------------ 26 | RETURN 27 | END 28 | -------------------------------------------------------------------------------- /tools/x13as_html/revs.i: -------------------------------------------------------------------------------- 1 | C 2 | C Created by REG on 03 Jan 2006 3 | C 4 | C... Variables in Common Block /firevs/ 5 | C MSEs and revision statistics given finite amount of data 6 | C in the past and semi-infinite amount of data in the future 7 | C where index identifies irregular, seasonal, and trend components. 8 | DOUBLE PRECISION infMSEs(3), infRevs(3) 9 | C MSEs and revision statistics given finite amount of data 10 | C in the past and finite amount of data in the future and 11 | C relative revision statistics to infRevs 12 | C where first index identifies irregular, seasonal, trend components 13 | C and where second index identifies one, two, three, four, five years 14 | C of data in the future. 15 | DOUBLE PRECISION finMSEs(3,5), finRevs(3,5), relRevs(3,5) 16 | C MSEs given finite anount of data in the past 17 | C and no data in the future 18 | DOUBLE PRECISION curMSEs(3) 19 | C Standard Error of Revisions for last 5 years of observations 20 | C for seasonal component and then trend component. 21 | DOUBLE PRECISION seRevs(60,2) 22 | common /firevs/ curMSEs, finMSEs, finRevs, infMSEs, infRevs, 23 | & relRevs, seRevs -------------------------------------------------------------------------------- /tools/x13as_html/revtrg.cmn: -------------------------------------------------------------------------------- 1 | c Targsa - Integer vector of displacements for seasonal adjustment 2 | c revisions history targets 3 | c Ntarsa - Number of seasonal adjustment revisions history targets 4 | c Targtr - Integer vector of displacements for trend revisions 5 | c history targets 6 | c Ntartr - Number of trend revisions history targets 7 | c----------------------------------------------------------------------- 8 | INTEGER Targsa,Ntarsa,Targtr,Ntartr 9 | DIMENSION Targsa(PTARGT),Targtr(PTARGT) 10 | c----------------------------------------------------------------------- 11 | COMMON /revtrg/ Targsa,Ntarsa,Targtr,Ntartr 12 | 13 | -------------------------------------------------------------------------------- /tools/x13as_html/revusr.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c Rusttl - data dictionary containing the names of the user-defined 3 | c regressors deleted during the revisions/sliding spans 4 | c analysis 5 | c Buser - parameter values for the user-defined regressors deleted 6 | c during the revisions/sliding spans analysis 7 | c Rusptr - pointer vector for data dictionary for user-defined 8 | c regressors deleted during the revisions/sliding spans 9 | c analysis 10 | c Nrustl - number of user-defined regressors deleted during the 11 | c revisions/sliding spans analysis 12 | c----------------------------------------------------------------------- 13 | CHARACTER Rusttl*(PCOLCR*PB) 14 | DOUBLE PRECISION Buser 15 | INTEGER Rusptr,Nrustl,Nzero,Nusadd,Usradd 16 | DIMENSION Rusptr(0:PUREG),Buser(PUREG),Nzero(PUREG),Usradd(PUREG) 17 | c----------------------------------------------------------------------- 18 | COMMON /revusr/ Buser,Rusptr,Nzero,Nrustl,Usradd,Nusadd,Rusttl 19 | c----------------------------------------------------------------------- 20 | 21 | -------------------------------------------------------------------------------- /tools/x13as_html/rho2.f: -------------------------------------------------------------------------------- 1 | **==rho2.f processed by SPAG 4.03F at 16:22 on 30 Mar 1994 2 | c----------------------------------------------------------------------- 3 | DOUBLE PRECISION FUNCTION rho2(U) 4 | IMPLICIT NONE 5 | DOUBLE PRECISION U,u2 6 | c----------------------------------------------------------------------- 7 | IF(abs(U).gt.2.798D0)THEN 8 | rho2=6.502D0 9 | ELSE 10 | u2=U*U 11 | rho2=(0.9249D0*u2)+(0.0812D0*u2*u2)-(0.0119D0*u2*u2*u2) 12 | END IF 13 | c----------------------------------------------------------------------- 14 | RETURN 15 | END 16 | -------------------------------------------------------------------------------- /tools/x13as_html/round.f: -------------------------------------------------------------------------------- 1 | C Last change: BCM 3 Aug 1998 12:53 pm 2 | INTEGER FUNCTION round(x) 3 | IMPLICIT NONE 4 | c ------------------------------------------------------------------- 5 | c Round x, returning an integer 6 | c ------------------------------------------------------------------- 7 | LOGICAL dpeq 8 | DOUBLE PRECISION X,ceilng,c1,c2 9 | EXTERNAL ceilng,dpeq 10 | c ------------------------------------------------------------------- 11 | c1=ceilng(X-0.5D0) 12 | c2=ceilng(X) 13 | IF(dpeq(c1,c2))THEN 14 | round=idint(c2) 15 | ELSE IF(dpeq(c1,X-0.5D0))THEN 16 | round=idint(c2) 17 | ELSE 18 | round=idint(c2)-1 19 | END IF 20 | c ------------------------------------------------------------------- 21 | RETURN 22 | END 23 | -------------------------------------------------------------------------------- /tools/x13as_html/rtestm.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /seasTest/ ... 3 | real*8 RTtre(Mpkp),RTsa(Mpkp) 4 | integer nrt 5 | common /rtestm/ RTtre,RTsa,nrt 6 | -------------------------------------------------------------------------------- /tools/x13as_html/sautco.f: -------------------------------------------------------------------------------- 1 | **==sautco.f processed by SPAG 4.03F at 09:53 on 1 Mar 1994 2 | SUBROUTINE sautco(X,Cxx,N1,N2,N,Lagh1,R,Good) 3 | IMPLICIT NONE 4 | C*** Start of declarations inserted by SPAG 5 | LOGICAL Good,dpeq 6 | DOUBLE PRECISION cn,R,X,xmean,cx0,Cxx 7 | INTEGER Lagh1,N,N1,N2 8 | EXTERNAL dpeq 9 | C*** End of declarations inserted by SPAG 10 | C THE OUTPUTS ARE AUTOCOVARIANCES (CXX(I), I = 0, LAGH) AND 11 | C AUTO CORRELATIONS (NORMALIZED COVARIANCES). 12 | C TUKEY-HANNING TAPER ROUTINE ADDED BY B. C. MONSELL 7-88 13 | DIMENSION X(*),Cxx(*) 14 | DIMENSION cn(1001) 15 | C MEAN DELETION 16 | CALL smeadl(X,N1,N2,N,xmean) 17 | C APPLY THE TUKEY-HANNING TAPER PRIOR TO CALCULATING THE SPECTRUM 18 | IF(R.gt.0D0)CALL taper(X,N1,N2,R) 19 | C AUTO COVARIANCE COMPUTATION 20 | C COMMON SUBROUTINE CALL 21 | CALL crosco(X,X,N1,N2,N,Cxx,Lagh1) 22 | C NORMALIZATION 23 | cx0=Cxx(1) 24 | IF(dpeq(cx0,0D0))THEN 25 | good=.false. 26 | ELSE 27 | C COMMON SUBROUTINE CALL 28 | CALL cornom(Cxx,cn,Lagh1,cx0,cx0) 29 | END IF 30 | RETURN 31 | END 32 | -------------------------------------------------------------------------------- /tools/x13as_html/savchi.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE savchi(Lsvchi,Lsvlch,Lprhdr,Tbwdth,Baselt,Grpstr,Nchr, 2 | & Info,Df,Chi2vl,Pv,Hdrstr,Nhdr,Savkey) 3 | IMPLICIT NONE 4 | c----------------------------------------------------------------------- 5 | INCLUDE 'srslen.prm' 6 | INCLUDE 'model.prm' 7 | INCLUDE 'notset.prm' 8 | INCLUDE 'units.cmn' 9 | c----------------------------------------------------------------------- 10 | CHARACTER Grpstr*(PGRPCR),Savkey*(*),Hdrstr*(31) 11 | LOGICAL Lprhdr,Lsvchi,Lsvlch 12 | INTEGER Tbwdth,Baselt,Nchr,Nhdr,Info,Df,i 13 | DOUBLE PRECISION Chi2vl,Pv 14 | c----------------------------------------------------------------------- 15 | IF(Lsvchi.and.baselt.ne.NOTSET) 16 | & WRITE(Nform,1010)Savkey,Grpstr(1:Nchr),Df,Chi2vl,Pv 17 | IF(Lsvlch) 18 | & CALL prtchi(Ng,Lprhdr,Tbwdth,Baselt,Grpstr,Nchr,Info,Df,Chi2vl, 19 | & Pv,Hdrstr,Nhdr,Lsvlch) 20 | c----------------------------------------------------------------------- 21 | RETURN 22 | c----------------------------------------------------------------------- 23 | 1010 FORMAT(a,a,': ',i4,2(1x,e22.15)) 24 | c----------------------------------------------------------------------- 25 | END 26 | -------------------------------------------------------------------------------- /tools/x13as_html/savcmn.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c This is a set of common blocks used in the EDITOR subroutine of 3 | c X-11-ARIMA, and contains most of the variables used by the 4 | c seasonal adjustment routines of X-12-ARIMA 5 | c----------------------------------------------------------------------- 6 | CHARACTER Svfmt*(11) 7 | c----------------------------------------------------------------------- 8 | c Length - Length of the series 9 | c---------------------------------------------------------------------- 10 | INTEGER Svprec,Svsize 11 | c----------------------------------------------------------------------- 12 | COMMON /savcmn/ Svprec,Svsize,Svfmt 13 | -------------------------------------------------------------------------------- /tools/x13as_html/sceast.f: -------------------------------------------------------------------------------- 1 | DOUBLE PRECISION FUNCTION sceast(Ndays,Pdays,First,Ineast) 2 | IMPLICIT NONE 3 | c ------------------------------------------------------------------ 4 | c function generates the Statistics Canada Easter regressor 5 | c ------------------------------------------------------------------ 6 | DOUBLE PRECISION ONE,ZERO 7 | PARAMETER(ONE=1.0D0,ZERO=0.0D0) 8 | c ------------------------------------------------------------------ 9 | LOGICAL First,Ineast 10 | INTEGER Ndays,Pdays 11 | c ------------------------------------------------------------------ 12 | IF(First)THEN 13 | IF(Pdays.eq.Ndays.or.Ineast)THEN 14 | sceast=ONE 15 | ELSE 16 | sceast=dble(Pdays)/dble(Ndays) 17 | END IF 18 | ELSE 19 | IF(Pdays.eq.Ndays)THEN 20 | sceast=ZERO 21 | ELSE 22 | sceast=dble(Pdays-Ndays)/dble(Ndays) 23 | END IF 24 | END IF 25 | c ------------------------------------------------------------------ 26 | RETURN 27 | END 28 | 29 | -------------------------------------------------------------------------------- /tools/x13as_html/scrmlt.f: -------------------------------------------------------------------------------- 1 | **==scrmlt.f processed by SPAG 4.03F at 09:53 on 1 Mar 1994 2 | SUBROUTINE scrmlt(C,N,X) 3 | IMPLICIT NONE 4 | c----------------------------------------------------------------------- 5 | c Subroutine to multiply a double precision vector by a scalar 6 | c----------------------------------------------------------------------- 7 | INTEGER i,N 8 | DOUBLE PRECISION C,X(*) 9 | c ------------------------------------------------------------------ 10 | DO i=1,N 11 | X(i)=C*X(i) 12 | END DO 13 | c ------------------------------------------------------------------ 14 | RETURN 15 | END 16 | -------------------------------------------------------------------------------- /tools/x13as_html/seastest.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /seasTest/ ... 3 | integer OST,crQS,crSNP,crPeaks 4 | integer totalSeasTR,totalSeasSA,totalSeasIR 5 | common /seasTest/ OST,crQS,crSNP,crPeaks, 6 | $ totalSeasTR,totalSeasSA,totalSeasIR 7 | -------------------------------------------------------------------------------- /tools/x13as_html/seatad.cmn: -------------------------------------------------------------------------------- 1 | DOUBLE PRECISION Orixs,Fctses 2 | DIMENSION Orixs(PLEN),Fctses(PFCST) 3 | c----------------------------------------------------------------------- 4 | COMMON / adseat / Orixs,Fctses 5 | -------------------------------------------------------------------------------- /tools/x13as_html/seatdg.cmn: -------------------------------------------------------------------------------- 1 | CHARACTER X13mdl*(132) 2 | DOUBLE PRECISION Kurt,Kurtse,Testnm,Skew,Skewse,Sdres,Ceetrn, 3 | & Ceesad,Prsetr,Prsesa,Aadasa,Aadatr,Tsetrn,Tsesea, 4 | & Tsetcm,Tsesad,Vartrn,Varsad,Varirr,Varsea,Dwstat, 5 | & SeasNP 6 | INTEGER Iprsm,Iqrsm,Ipssm,Iqssm,Idrsm,Idssm,Ssghst,Ssgcnc,Ssgfct, 7 | & Nxmdl 8 | DIMENSION Prsetr(5),Prsesa(5),Vartrn(3),Varsad(3),Varirr(3), 9 | & Varsea(3) 10 | c----------------------------------------------------------------------- 11 | COMMON /stdiag/Kurt,Kurtse,Testnm,Skew,Skewse,Sdres,Ceetrn,Ceesad, 12 | & Prsetr,Prsesa,Aadasa,Aadatr,Tsetrn,Tsesea,Tsetcm, 13 | & Tsesad,Vartrn,Varsad,Varirr,Varsea,Dwstat,SeasNP, 14 | & Ssghst,Ssgcnc,Ssgfct,Iprsm,Iqrsm,Ipssm,Iqssm,Idrsm, 15 | & Idssm 16 | COMMON /chdiag/X13mdl,Nxmdl 17 | c----------------------------------------------------------------------- 18 | -------------------------------------------------------------------------------- /tools/x13as_html/seatlg.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | LOGICAL Havetr,Havesf,Haveir,Havesa,Havecy,Havftr,Havfsf,Havfir, 3 | & Havfsa,Havfcy,Hvfttr,Hvftsf,Hvftor,Hvftsa,Hvftcy,Hseftr, 4 | & Hsefsf,Hsefor,Hsefsa,Hsefcy,Hsrftr,Hsrfsf,Hsrfsa,Hsrfcy, 5 | & Haveaf,Hpitrc,Hpis,Hpitra,Hpisa,Hvstsa,Hvstir,Hvtrse, 6 | & Hvsfse,Hvsase,Hvcyse,Hvscyc,Hvsltt,Hvodff 7 | c----------------------------------------------------------------------- 8 | COMMON / seatlg / Havetr,Havesf,Haveir,Havesa,Havecy,Havftr, 9 | & Havfsf,Havfir,Havfsa,Havfcy,Hvfttr,Hvftsf, 10 | & Hvftor,Hvftsa,Hvftcy,Hseftr,Hsefsf,Hsefor, 11 | & Hsefsa,Hsefcy,Hsrftr,Hsrfsf,Hsrfsa,Hsrfcy, 12 | & Haveaf,Hpitrc,Hpis,Hpitra,Hvstir,Hpisa,Hvstsa, 13 | & Hvtrse,Hvsfse,Hvsase,Hvcyse,Hvscyc,Hvsltt, 14 | & Hvodff 15 | -------------------------------------------------------------------------------- /tools/x13as_html/seatmd.cmn: -------------------------------------------------------------------------------- 1 | INTEGER Ntcnum,Ntcden,Nsnum,Nsden,Nsanum,Nsaden,Ntrnum,Ntrden, 2 | & Ntcwkf,Nsawkf,Nswkf,Ntrwkf,Nirwkf,Nrsdex,Nsfsa,Nsftr, 3 | & Nsfsf,Nsfir,Nsfcy,Lstsse,Lstyse,Lsttse,Lstase,Nfcfor, 4 | & Nodiff 5 | DOUBLE PRECISION Tcnum,Tcden,Tcvar,Snum,Sden,Svar,Sanum,Saden, 6 | & Savar,Trnum,Trden,Trvar,Irrvar,Tcwkf,Sawkf, 7 | & Swkf,Trwkf,Irwkf,Srsdex 8 | DIMENSION Tcnum(8),Tcden(8),Snum(27),Sden(27),Sanum(32),Saden(20), 9 | & Trnum(32),Trden(17),Tcwkf(120),Sawkf(120),Swkf(120), 10 | & Trwkf(120),Irwkf(120),Srsdex(PLEN) 11 | c----------------------------------------------------------------------- 12 | COMMON /seatmd/ Tcnum,Tcden,Tcvar,Snum,Sden,Svar,Sanum,Saden, 13 | & Savar,Trnum,Trden,Trvar,Irrvar,Tcwkf,Sawkf,Swkf, 14 | & Trwkf,Irwkf,Srsdex,Ntcnum,Ntcden,Nsnum,Nsden, 15 | & Nsanum,Nsaden,Ntrnum,Ntrden,Ntcwkf,Nsawkf,Nswkf, 16 | & Ntrwkf,Nirwkf,Nrsdex,Nsfsa,Nsftr,Nsfsf,Nsfir, 17 | & Nsfcy,Lstsse,Lstyse,Lsttse,Lstase,Nfcfor,Nodiff 18 | c----------------------------------------------------------------------- 19 | -------------------------------------------------------------------------------- /tools/x13as_html/seatop.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c Options from Seats spec 3 | c----------------------------------------------------------------------- 4 | CHARACTER*100 Tabtbl 5 | DOUBLE PRECISION Epsph2,Xl2,Rmod2,Epsiv2,Hplan2 6 | INTEGER Qmax2,Out2,Maxit2,Kmean,Bias2,Iphtrf,Hptrgt 7 | LOGICAL Lnoadm,Lhp,Lstsea,Lfinit,Lmdsum,Lsgud,Lhprmls 8 | c----------------------------------------------------------------------- 9 | COMMON /setopt/ Epsph2,Xl2,Rmod2,Epsiv2,Hplan2,Qmax2,Out2,Bias2, 10 | & Maxit2,Kmean,Iphtrf,Hptrgt,Lnoadm,Lhp,Lsgud, 11 | & Lstsea,Lfinit,Lmdsum,Lhprmls,Tabtbl 12 | -------------------------------------------------------------------------------- /tools/x13as_html/seatserr.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /SeatsError/ ... 3 | integer countError,haveError 4 | common /SeatsError/ countError,haveError 5 | -------------------------------------------------------------------------------- /tools/x13as_html/series.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c Variables in the common cseries used in the nonlinear routine. 3 | c Common should only be found in the main and the function evaluation 4 | c routine. This file is dependant on srslen.prm 5 | c----------------------------------------------------------------------- 6 | c Name Type Description cseries common variables 7 | c----------------------------------------------------------------------- 8 | c Dnefob d Input number of effective observations and the length of 9 | c the differenced regression variables and series less the 10 | c order of the DF*AR operators if the AR is conditional and 11 | c less DF if the AR is exact. 12 | c Lrgrsd d magnitude of the largest residual needed for the 13 | c constrained estimation in Minpack 14 | c Tsrs d Psrs long copy of the series input to the nonlinear routine 15 | c----------------------------------------------------------------------- 16 | c Variable typing and initialization 17 | c----------------------------------------------------------------------- 18 | DOUBLE PRECISION Dnefob,Lrgrsd,Tsrs 19 | DIMENSION Tsrs(PLEN) 20 | COMMON /csrs/ Dnefob,Lrgrsd,Tsrs 21 | 22 | -------------------------------------------------------------------------------- /tools/x13as_html/sername.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /serName/ ... 3 | integer niter 4 | character mattitle*180 5 | common /serName/ niter,mattitle 6 | -------------------------------------------------------------------------------- /tools/x13as_html/serrlev.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /serrlev/ ... 3 | real*8 SEFES 4 | real*8 SETA(-kp:kp),SETP(-kp:kp),SETS(-kp:kp),SETC(-kp:kp), 5 | $ SESER(kp),SERA(-kp:kp),SERP(-kp:kp),SERC(-kp:kp), 6 | $ SERS(-kp:kp) 7 | common /serrlev/ SETA,SETP,SETS,SETC,SESER,SEFES,SERA,SERP,SERC, 8 | $ SERS 9 | -------------------------------------------------------------------------------- /tools/x13as_html/sesfcast.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /sesfcast/ ... 3 | real*8 SESFCAST(KP),RFACT(KP),ERESID(MPKP) 4 | integer numEresid 5 | common /sesfcast/ SESFCAST,RFACT,ERESID,numEresid 6 | -------------------------------------------------------------------------------- /tools/x13as_html/setchr.f: -------------------------------------------------------------------------------- 1 | C Last change: BCM 25 Nov 97 9:52 am 2 | **==setchr.f processed by SPAG 4.03F at 09:53 on 1 Mar 1994 3 | SUBROUTINE setchr(Chr,Nchr,Chrvec) 4 | IMPLICIT NONE 5 | c----------------------------------------------------------------------- 6 | c Subroutine to set each character in a character vector to chr 7 | c----------------------------------------------------------------------- 8 | CHARACTER Chr*1,Chrvec*(*) 9 | INTEGER i,Nchr 10 | c ------------------------------------------------------------------ 11 | DO i=1,Nchr 12 | Chrvec(i:i)=Chr 13 | END DO 14 | c ------------------------------------------------------------------ 15 | RETURN 16 | END 17 | -------------------------------------------------------------------------------- /tools/x13as_html/setdp.f: -------------------------------------------------------------------------------- 1 | **==setdp.f processed by SPAG 4.03F at 09:53 on 1 Mar 1994 2 | SUBROUTINE setdp(Const,N,X) 3 | IMPLICIT NONE 4 | c----------------------------------------------------------------------- 5 | c Subroutine to set a double precision vector to const*J 6 | c----------------------------------------------------------------------- 7 | INTEGER i,N 8 | DOUBLE PRECISION Const,X(*) 9 | c ------------------------------------------------------------------ 10 | DO i=1,N 11 | X(i)=Const 12 | END DO 13 | c ------------------------------------------------------------------ 14 | RETURN 15 | END 16 | -------------------------------------------------------------------------------- /tools/x13as_html/setint.f: -------------------------------------------------------------------------------- 1 | **==setint.f processed by SPAG 4.03F at 09:53 on 1 Mar 1994 2 | SUBROUTINE setint(Intcnt,Nh,H) 3 | IMPLICIT NONE 4 | c----------------------------------------------------------------------- 5 | c Subroutine to set an integer vector to intcnt*J 6 | c----------------------------------------------------------------------- 7 | INTEGER i,Intcnt,Nh,H(*) 8 | c ------------------------------------------------------------------ 9 | DO i=1,Nh 10 | H(i)=Intcnt 11 | END DO 12 | c ------------------------------------------------------------------ 13 | RETURN 14 | END 15 | -------------------------------------------------------------------------------- /tools/x13as_html/setlg.f: -------------------------------------------------------------------------------- 1 | **==setlg.f processed by SPAG 4.03F at 09:53 on 1 Mar 1994 2 | SUBROUTINE setlg(Lconst,N,X) 3 | IMPLICIT NONE 4 | c----------------------------------------------------------------------- 5 | c Subroutine to set a logical vector to lconst*J 6 | c----------------------------------------------------------------------- 7 | LOGICAL Lconst,X 8 | INTEGER i,N 9 | DIMENSION X(*) 10 | c ------------------------------------------------------------------ 11 | DO i=1,N 12 | X(i)=Lconst 13 | END DO 14 | c ------------------------------------------------------------------ 15 | RETURN 16 | END 17 | -------------------------------------------------------------------------------- /tools/x13as_html/setmv.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE setmv(Srs,Mvind,Mvval,Pos1ob,Posfob) 2 | IMPLICIT NONE 3 | c----------------------------------------------------------------------- 4 | c Check to see if prior adjustments have brought down missing 5 | c value code, and reset missing value code if this has occurred. 6 | c----------------------------------------------------------------------- 7 | DOUBLE PRECISION Srs,Mvval 8 | LOGICAL Mvind 9 | INTEGER Pos1ob,Posfob,i 10 | DIMENSION Srs(*),Mvind(*) 11 | c----------------------------------------------------------------------- 12 | DO i=Pos1ob,Posfob 13 | IF(Mvind(i))Srs(i)=Mvval 14 | END DO 15 | c----------------------------------------------------------------------- 16 | RETURN 17 | END 18 | -------------------------------------------------------------------------------- /tools/x13as_html/setsvl.i: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c Table pointer variables used for svltbl are of the form LSL 3 | c where the types are 4 | c----------------------------------------------------------------------- 5 | c seats model smd 6 | c normality test nrm 7 | c total squared error tse 8 | c component variance cvr 9 | c concurrent estimate error cee 10 | c percent reduction se prs 11 | c average abs. diff. in annual averages aad 12 | c----------------------------------------------------------------------- 13 | INTEGER LSLSMD,LSLXMD,LSLSNR,LSLTSE,LSLCVR,LSLCEE,LSLPRS,LSLAAD, 14 | & LSLOUE,LSLOUS,LSLSSG,LSLDW,LSLFRS,LSLALS 15 | PARAMETER( 16 | & LSLSMD= 95,LSLXMD= 96,LSLSNR= 98,LSLTSE= 99,LSLCVR=100, 17 | & LSLCEE=101,LSLPRS=102,LSLAAD=103,LSLOUE=104,LSLOUS=105, 18 | & LSLSSG=106,LSLDW=107,LSLFRS=108,LSLALS=109) 19 | -------------------------------------------------------------------------------- /tools/x13as_html/settab.prm: -------------------------------------------------------------------------------- 1 | DATA sumtab/ 2 | & T,F,F,F,F,F,F,F,F,F, F,F,F,F,T,F,F,F,F,F, F,F,F,F,F,F,F,F,F,F, 3 | & F,F,F,F,F,F,F,F,F,F, F,F,F,F,F,F,F,F,F,F, F,F,F,F,F,F,F,F,F,F, 4 | & F,F,F,F,F,F,F,F,F,F, F,F,F,F,F,F,F,F,F,F, F,F,F,F,F,F,F,F,F,F, 5 | & F,F,F,F,F,F,F,F,F,F, F,F,F,F,F,F,F,F,T,T, F,F,F,T,F,F,T,F,F,F, 6 | & F,F,F,F,F,F,F,F,F,T, T,T,T,T,T,T,T,T,T,T, T,T,F,F,F,F,F,T,T,T, 7 | & T,T,T,T,T,T,F,F,F,F, F,F,T,T,F,F,F,F,F,F, F,F,F,F,F,F,F,T,T,F, 8 | & F,F,T,F,F,F/ 9 | c ------------------------------------------------------------------ 10 | DATA deftab/ 11 | & T,T,T,F,T,T,T,F,F,T, T,T,T,T,T,T,F,F,T,F, T,F,T,F,T,F,F,T,F,F, 12 | & T,T,T,T,T,T,T,F,T,T, F,F,F,F,F,F,F,F,F,F, F,F,F,F,F,F,T,F,F,F, 13 | & T,F,F,F,T,F,T,F,F,T, F,F,T,F,F,T,T,F,F,F, T,F,T,F,F,T,T,T,F,T, 14 | & F,T,T,F,T,F,F,T,T,T, T,T,T,F,T,T,F,T,T,T, T,T,T,T,T,T,F,T,F,T, 15 | & F,T,F,T,F,T,F,T,T,T, T,T,T,T,T,T,T,T,T,T, T,T,F,F,F,F,F,T,T,T, 16 | & T,T,T,T,T,T,F,F,F,F, T,F,T,T,T,T,T,T,T,T, F,F,F,T,T,T,F,T,T,F, 17 | & T,T,T,T,F,F/ 18 | -------------------------------------------------------------------------------- /tools/x13as_html/setxpt.f: -------------------------------------------------------------------------------- 1 | **==setxpt.f processed by SPAG 4.03F at 09:53 on 1 Mar 1994 2 | SUBROUTINE setxpt(Nf2,Lsadj,Fctdrp) 3 | IMPLICIT NONE 4 | c----------------------------------------------------------------------- 5 | c Set up "pointers" variables for X-11 to tell where backcasts, 6 | c data, forecasts begin and end. 7 | c----------------------------------------------------------------------- 8 | INCLUDE 'x11ptr.cmn' 9 | INCLUDE 'extend.cmn' 10 | INCLUDE 'lzero.cmn' 11 | c----------------------------------------------------------------------- 12 | INTEGER Fctdrp,nspobs,Nf2 13 | LOGICAL Lsadj 14 | c----------------------------------------------------------------------- 15 | c Set X-11 Pointer values 16 | c----------------------------------------------------------------------- 17 | nspobs=Nofpob-Nf2 18 | Pos1bk=Nbcst2-Nbcst+Lsp 19 | Pos1ob=Nbcst2+Lsp 20 | Posfob=Nbcst2+nspobs+Lsp-1 21 | Posffc=Nbcst2+nspobs+Nfcst+Lsp-1 22 | IF((.not.Lsadj).and.Fctdrp.gt.0)Posffc=max(Posfob,Posffc-Fctdrp) 23 | c----------------------------------------------------------------------- 24 | RETURN 25 | END 26 | -------------------------------------------------------------------------------- /tools/x13as_html/sfcast.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /savefcast/ ... 3 | integer NSFCAST,NSFCAST1 4 | C.. 5 | C This variable is for test to be removed 6 | C 7 | integer Iseasse 8 | real*8 SQFSAVE 9 | real*8 SFCAST(KP) 10 | common /savefcast/ SFCAST,SQFSAVE,NSFCAST,Iseasse,NSFCAST1 11 | -------------------------------------------------------------------------------- /tools/x13as_html/sform.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /sform/ ... 3 | integer NZ,NYER,NPER,NFREQ,REVERSE 4 | common /sform/ NZ,NYER,NPER,NFREQ,REVERSE 5 | -------------------------------------------------------------------------------- /tools/x13as_html/sig.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /sig/ ... 3 | integer SQG,HAR,FORTR,ILAM,NA,PG,NOADMISS,OUT,ITER,L,NDEC, 4 | $ BIAS,INOADMISS,RSA,NHTOFIX 5 | character TTLSET*80 6 | real*8 SQF,DOF,TIME,ZVAR,SEK,EPSPHI,RMOD,MAXBIAS 7 | common /sig/ TTLSET,SQF,DOF,TIME,ZVAR,SEK,EPSPHI,RMOD,MAXBIAS, 8 | $ SQG,HAR,FORTR,ILAM,NA,PG,NOADMISS,OUT,ITER,L, 9 | $ NDEC,BIAS,INOADMISS,RSA,NHTOFIX 10 | -------------------------------------------------------------------------------- /tools/x13as_html/sig1.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /sig1/ ... 3 | integer NOVER,IONEOUT,ITABLE,NREESTIMATED,PSIEINIC,PSIEFIN 4 | common /sig1/ NOVER,IONEOUT,ITABLE,NREESTIMATED,PSIEINIC,PSIEFIN 5 | -------------------------------------------------------------------------------- /tools/x13as_html/sigex.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x13org/x13binary/c7d0198181c9f09353da0136f5c18da6b0d40999/tools/x13as_html/sigex.f -------------------------------------------------------------------------------- /tools/x13as_html/skplst.f: -------------------------------------------------------------------------------- 1 | **==skplst.f processed by SPAG 4.03F at 09:53 on 1 Mar 1994 2 | SUBROUTINE skplst(Clsgtp) 3 | c---------------------------------------------------------------------- 4 | c Looks for a close list character or end-of-file and returns. 5 | c Note this will skip over comments and quotes because it uses lex. 6 | c---------------------------------------------------------------------- 7 | IMPLICIT NONE 8 | INCLUDE 'lex.i' 9 | c ----------------------------------------------------------------- 10 | INTEGER Clsgtp 11 | c ----------------------------------------------------------------- 12 | DO WHILE (.true.) 13 | IF(Nxtktp.ne.Clsgtp.and.Nxtktp.ne.EOF)THEN 14 | CALL lex() 15 | c ----------------------------------------------------------------- 16 | ELSE 17 | CALL lex() 18 | RETURN 19 | END IF 20 | END DO 21 | c ----------------------------------------------------------------- 22 | END 23 | -------------------------------------------------------------------------------- /tools/x13as_html/smeadl.f: -------------------------------------------------------------------------------- 1 | **==smeadl.f processed by SPAG 4.03F at 09:53 on 1 Mar 1994 2 | SUBROUTINE smeadl(X,N1,N2,N,Xmean) 3 | IMPLICIT NONE 4 | C*** Start of declarations inserted by SPAG 5 | DOUBLE PRECISION an,sumf,X,Xmean 6 | INTEGER i,N,N1,N2 7 | C*** End of declarations inserted by SPAG 8 | C MEAN DELETION 9 | C SUMF: FUNCTION 10 | DIMENSION X(*) 11 | an=dble(N) 12 | Xmean=sumf(X,N1,N2)/an 13 | DO i=N1,N2 14 | X(i)=X(i)-Xmean 15 | END DO 16 | RETURN 17 | END 18 | -------------------------------------------------------------------------------- /tools/x13as_html/spcidx.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c Store peak indexes, frequencies for spectral estimates 3 | c----------------------------------------------------------------------- 4 | DOUBLE PRECISION Sfreq,Tfreq,Frq,Frqpk 5 | INTEGER Slow,Sup,Tlow,Tup,Speak,Nsfreq,Tpeak,Ntfreq,Nfreq 6 | c----------------------------------------------------------------------- 7 | DIMENSION Slow(6),Sup(5),Tlow(5),Tup(5),Speak(6),Tpeak(6), 8 | & sfreq(6),tfreq(6),Frq(61),Frqpk(76) 9 | c----------------------------------------------------------------------- 10 | COMMON /cspcid/ Frq,Frqpk,Sfreq,Tfreq,Slow,Sup,Tlow,Tup,Speak, 11 | & Tpeak,Nsfreq,Ntfreq,Nfreq 12 | c----------------------------------------------------------------------- -------------------------------------------------------------------------------- /tools/x13as_html/spcsvl.i: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c Table pointer variables used for svltbl are of the form LSL 3 | c where the types are 4 | c----------------------------------------------------------------------- 5 | c Spectral plots with peaks SPC 6 | c Spectral plots with peaks, composite adjustment CSP 7 | c----------------------------------------------------------------------- 8 | INTEGER LSLSPK,LSLDSP,LSLISP,LSLTPK,LSLDTP,LSLITP,LSLQS,LSLDQS, 9 | & LSLIQS,LSLQCH,LSLNPA,LSLDNP,LSLINP,LSLALP 10 | PARAMETER( 11 | & LSLSPK= 61,LSLDSP= 62,LSLISP= 63,LSLTPK= 64,LSLDTP= 65, 12 | & LSLITP= 66,LSLQS= 67,LSLDQS= 68,LSLIQS= 69,LSLQCH= 70, 13 | & LSLNPA= 71,LSLDNP= 72,LSLINP= 73,LSLALP= 74) 14 | -------------------------------------------------------------------------------- /tools/x13as_html/spe.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /spe/ ... 3 | real*8 QT1 4 | common /spe/ QT1 5 | -------------------------------------------------------------------------------- /tools/x13as_html/specpeak.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x13org/x13binary/c7d0198181c9f09353da0136f5c18da6b0d40999/tools/x13as_html/specpeak.f -------------------------------------------------------------------------------- /tools/x13as_html/spectra.i: -------------------------------------------------------------------------------- 1 | c spectra.i 2 | include 'spectrum.i' 3 | real*8 spect(Lspect),spectse(Lspect),spects(Lspect), 4 | $ spectsa(Lspect),spectt(Lspect),specty(Lspect), 5 | $ spectBC(Lspect),spectM(Lspect),spectei(Lspect), 6 | $ spectes(Lspect),spectet(Lspect),spectey(Lspect), 7 | $ spectesa(Lspect),spectec(Lspect),specteBC(Lspect), 8 | $ specteM(Lspect) 9 | 10 | common /spectra/ spect,spectse,spects,spectsa,spectt,specty, 11 | $ spectBC,spectM,spectei,spectes,spectet,spectey,spectesa, 12 | $ spectec,specteBC,specteM 13 | -------------------------------------------------------------------------------- /tools/x13as_html/spectrum.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x13org/x13binary/c7d0198181c9f09353da0136f5c18da6b0d40999/tools/x13as_html/spectrum.f -------------------------------------------------------------------------------- /tools/x13as_html/spectrum.i: -------------------------------------------------------------------------------- 1 | c Spectrum.i 2 | integer Lspect,SPECLENGTH 3 | parameter (Lspect=300,SPECLENGTH=120) 4 | -------------------------------------------------------------------------------- /tools/x13as_html/srslen.i: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c PLEN is the integer PARAMETER for the maximum length of a 3 | c series. 4 | c----------------------------------------------------------------------- 5 | c Name Type Description 6 | c----------------------------------------------------------------------- 7 | c PFCST i PARAMETER for the maximum number of forecasts 8 | c POBS i PARAMETER for the maximum length of the series 9 | c PLEN i PARAMETER for the maximum length of the series + back and 10 | c forecasts 11 | c PYRS i PARAMETER for the maximum number of years in the series + 12 | c back and forecasts 13 | c PYR1 i PARAMETER for the maximum number of years in the series 14 | c PTD i PARAMETER for the number of types of trading day factors 15 | c (based on lenght of month, starting period) 16 | c PSP - maximum length of seasonal period (formerly in model.cmn) 17 | c----------------------------------------------------------------------- 18 | INTEGER POBS,PLEN,PFCST,PYR1,PYRS,PSRSCR,PTD,PSP 19 | PARAMETER(PSP=12,PFCST=10*PSP,PYR1=65,POBS=PYR1*PSP,PYRS=PYR1+10, 20 | & PLEN=POBS+(2*PFCST),PSRSCR=79,PTD=28) 21 | -------------------------------------------------------------------------------- /tools/x13as_html/srslen.prm: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c PLEN is the integer PARAMETER for the maximum length of a 3 | c series. 4 | c----------------------------------------------------------------------- 5 | c Name Type Description 6 | c----------------------------------------------------------------------- 7 | c PFCST i PARAMETER for the maximum number of forecasts 8 | c POBS i PARAMETER for the maximum length of the series 9 | c PLEN i PARAMETER for the maximum length of the series + back and 10 | c forecasts 11 | c PYRS i PARAMETER for the maximum number of years in the series + 12 | c back and forecasts 13 | c PYR1 i PARAMETER for the maximum number of years in the series 14 | c PTD i PARAMETER for the number of types of trading day factors 15 | c (based on lenght of month, starting period) 16 | c PSP - maximum length of seasonal period (formerly in model.cmn) 17 | c----------------------------------------------------------------------- 18 | INTEGER POBS,PLEN,PFCST,PYR1,PYRS,PSRSCR,PTD,PSP 19 | PARAMETER(PSP=12,PFCST=10*PSP,PYR1=65,POBS=PYR1*PSP,PYRS=PYR1+20, 20 | & PLEN=POBS+(2*PFCST),PSRSCR=79,PTD=28) 21 | -------------------------------------------------------------------------------- /tools/x13as_html/ssap.prm: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c MXLEN : Maximum length of sliding spans matrix 3 | c MXCOL : Maximum number of columns in a sliding spans matrix 4 | c MXYR : Maximum number of years in sliding span 5 | c NEST : Number of estimates analyzed in sliding spans 6 | c----------------------------------------------------------------------- 7 | INTEGER MXLEN,MXCOL,MXYR,NEST 8 | PARAMETER(MXCOL=4,MXYR=23,MXLEN=PSP*MXYR,NEST=5) 9 | -------------------------------------------------------------------------------- /tools/x13as_html/ssft.cmn: -------------------------------------------------------------------------------- 1 | INTEGER Icol,Issqf 2 | DOUBLE PRECISION Ssfts,Ssmf 3 | c----------------------------------------------------------------------- 4 | DIMENSION Ssfts(MXCOL),Ssmf(MXCOL),Issqf(MXCOL) 5 | c----------------------------------------------------------------------- 6 | COMMON /ssft / Ssfts,Ssmf,Issqf,Icol 7 | -------------------------------------------------------------------------------- /tools/x13as_html/sspdat.cmn: -------------------------------------------------------------------------------- 1 | C----------------------------------------------------------------------- 2 | C Common block that contains data for the sliding spans analysis 3 | C----------------------------------------------------------------------- 4 | DOUBLE PRECISION Sfind,Saind,Sfinda,S,Sa,Isfadd,Td 5 | C----------------------------------------------------------------------- 6 | DIMENSION S(MXLEN,MXCOL),Sfind(MXLEN,MXCOL),Sfinda(MXLEN,MXCOL), 7 | & Saind(MXLEN,MXCOL),Sa(MXLEN,MXCOL),Isfadd(MXLEN,MXCOL), 8 | & Td(MXLEN,MXCOL) 9 | C----------------------------------------------------------------------- 10 | COMMON /sser / Sfind,Sfinda,Saind,S,Sa,Isfadd,Td 11 | -------------------------------------------------------------------------------- /tools/x13as_html/sspvec.cmn: -------------------------------------------------------------------------------- 1 | DOUBLE PRECISION Aobs,Ayr,Aobsmx,Ayrmx 2 | INTEGER Chsgn,Iturn,SSnobs,SSnyr,Csign,Cturn,Per 3 | c----------------------------------------------------------------------- 4 | DIMENSION Aobs(PSP,NEST),Ayr(MXYR,NEST),Chsgn(NEST),Iturn(NEST), 5 | & Csign(MXLEN,NEST),Cturn(MXLEN,NEST),Per(MXLEN,NEST), 6 | & SSnobs(PSP,NEST),SSnyr(MXYR,NEST),Aobsmx(NEST), 7 | & Ayrmx(NEST) 8 | c----------------------------------------------------------------------- 9 | COMMON /ssvec / Aobs,Ayr,Aobsmx,Ayrmx,Chsgn,Iturn,SSnobs,SSnyr, 10 | & Csign,Per,Cturn 11 | -------------------------------------------------------------------------------- /tools/x13as_html/stcfcm.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | DOUBLE PRECISION Stcftr,Stcfsf,Stcfor,Stcfsa,Stcfcy 3 | LOGICAL Hvstft,Hvstfs,Hvstfo,Hvstfa,Hvstfc 4 | DIMENSION Stcftr(PFCST),Stcfsf(PFCST),Stcfor(PFCST),Stcfsa(PFCST), 5 | & Stcfcy(PFCST) 6 | c----------------------------------------------------------------------- 7 | COMMON / stcfcm / Stcftr,Stcfsf,Stcfor,Stcfsa,Stcfcy 8 | COMMON / stclcm / Hvstft,Hvstfs,Hvstfo,Hvstfa,Hvstfc 9 | c----------------------------------------------------------------------- 10 | -------------------------------------------------------------------------------- /tools/x13as_html/stream.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /stream/ ... 3 | integer MaxStrLength,MaxLineLength 4 | Parameter(MaxStrLength=2000,MaxLineLength=120) 5 | integer NIO,Nprof 6 | common /stream/ NIO,Nprof 7 | -------------------------------------------------------------------------------- /tools/x13as_html/strmodel.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /strModel/ ... 3 | character lu61*600,lu62*1200,lu63*1000,lu64*800,lu64I*50 4 | common /strModel/ lu61,lu62,lu63,lu64,lu64I 5 | -------------------------------------------------------------------------------- /tools/x13as_html/sumf.f: -------------------------------------------------------------------------------- 1 | **==sumf.f processed by SPAG 4.03F at 09:54 on 1 Mar 1994 2 | DOUBLE PRECISION FUNCTION sumf(X,N1,N2) 3 | IMPLICIT NONE 4 | C*** Start of declarations inserted by SPAG 5 | INTEGER i,N1,N2 6 | DOUBLE PRECISION X 7 | C*** End of declarations inserted by SPAG 8 | C COMMON SUBROUTINE 9 | DIMENSION X(*) 10 | sumf=0D0 11 | DO i=N1,N2 12 | sumf=sumf+X(i) 13 | END DO 14 | RETURN 15 | END 16 | -------------------------------------------------------------------------------- /tools/x13as_html/sums.i: -------------------------------------------------------------------------------- 1 | C... Variables in Common Block /varSumS/ ... 2 | integer tTMCS,tANA,tScomp,tCycComp,tStocTD,tSpecFac,tACF,tCCF, 3 | $ tUnstSa,tUnrSa,tRevSa,tSeasNoSig,tBias,tCrQs,tCrSNP, 4 | $ tCrPeaks,tX11,tSeats,tNSA 5 | common /varSumS/ tTMCS,tANA,tScomp,tCycComp,tStocTD,tSpecFac, 6 | $ tACF,tCCF,tUnstSa,tUnrSa,tRevSa,tSeasNoSig,tBias,tCrQs, 7 | $ tCrSNP,tCrPeaks,tX11,tSeats,tNSA 8 | -------------------------------------------------------------------------------- /tools/x13as_html/sumtab.prm: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c sumtab - logical variable which defines those tables to be saved 3 | c when the -s flag is used 4 | c DATA statement that defines sumtab is in sumtab.var 5 | c----------------------------------------------------------------------- 6 | LOGICAL sumtab 7 | DIMENSION sumtab(NTBL) 8 | -------------------------------------------------------------------------------- /tools/x13as_html/svdttm.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE svdttm(Nform,datstr) 2 | IMPLICIT NONE 3 | c----------------------------------------------------------------------- 4 | c Function for Lahey fortran (PC) to print date and time information 5 | c to the .xdg file. 6 | c----------------------------------------------------------------------- 7 | CHARACTER datstr*24 8 | INTEGER Nform 9 | c----------------------------------------------------------------------- 10 | * CHARACTER cvdttm*(24) 11 | * EXTERNAL cvdttm 12 | c----------------------------------------------------------------------- 13 | WRITE(Nform,1020)datstr(1:15) 14 | 1020 FORMAT('date:',a) 15 | WRITE(Nform,1030)datstr(15:24) 16 | 1030 FORMAT('time:',a) 17 | c----------------------------------------------------------------------- 18 | RETURN 19 | END 20 | 21 | -------------------------------------------------------------------------------- /tools/x13as_html/svllog.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c Svltab - Logical vector indicating which diagnostic will be stored 3 | c in the log file. 4 | c----------------------------------------------------------------------- 5 | LOGICAL Svltab 6 | DIMENSION Svltab(NSVLOG) 7 | c----------------------------------------------------------------------- 8 | COMMON /csvllg/Svltab 9 | -------------------------------------------------------------------------------- /tools/x13as_html/svllog.prm: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c Note NSVLOG (the number of tables) is half PSVLOG because each 3 | c table has a long and short name. In the table dictionaries the short 4 | c name is written after each long name so the 2i-1 and 2i entries relate 5 | c to table i. change NSVLOG from 111->109, Jan.2021 6 | c----------------------------------------------------------------------- 7 | INTEGER NSVLOG 8 | PARAMETER(NSVLOG=109) 9 | c----------------------------------------------------------------------- 10 | -------------------------------------------------------------------------------- /tools/x13as_html/svltbl.var: -------------------------------------------------------------------------------- 1 | DATA svlptr / 1,14,17,26,29,37,40,51,54,58,60,73,76,90,93,102,105, 2 | &108,111,115,118,121,124,135,137,140,143,157,160,165,168,182,185, 3 | &192,195,203,206,216,218,231,234,245,248,257,260,270,273,282,285, 4 | &292,295,307,309,321,324,338,341,343,345,347,349,351,353,355,357, 5 | &359,361,363,365,367,369,371,373,375,377,380,383,386,389,390,391, 6 | &393,395,410,413,420,423,432,435,444,447,458,461,471,474,488,491, 7 | &498,501,512,515,528,531,545,548,562,565,583,586,597,600,615,618, 8 | &633,636,650,653,660,663,671,674,679,682,690,693,701,704,714,717, 9 | &730,733,746,749,751,753,758,761,766,769,775,778,782,785,792,795, 10 | &802,805,819,822,827,830,835,838,843,846,851,854,859,862,867,870, 11 | &875,878,883,886,891,894,900,903,909,912,916,918,923,926,944,947, 12 | &957,960,972,975,989,992,1005,1008,1015,1018,1032,1035,1045,1048, 13 | &1056,1059,1067,1070,1083,1086,1103,1106,1123,1126,1144,1147,1165, 14 | &1168,1188,1191,1210,1213,1232,1235,1249,1252,1264,1267,1275,1278, 15 | &1292,1295 / 16 | -------------------------------------------------------------------------------- /tools/x13as_html/taper.f: -------------------------------------------------------------------------------- 1 | **==taper.f processed by SPAG 4.03F at 09:54 on 1 Mar 1994 2 | SUBROUTINE taper(X,L1,L2,R) 3 | IMPLICIT NONE 4 | C*** Start of declarations inserted by SPAG 5 | DOUBLE PRECISION R,r1,r2,tap,X,xpi,xtap 6 | INTEGER i,l,L1,L2 7 | C*** End of declarations inserted by SPAG 8 | DIMENSION X(*) 9 | DOUBLE PRECISION PI,ONE,TWO 10 | PARAMETER(PI=3.14159265358979d0,ONE=1D0,TWO=2D0) 11 | C *** 12 | C *** THIS SUBROUTINE APPLIES THE TUKEY-HANNING TAPER TO A SERIES 13 | C *** PRIOR TO CALCULATING THE SPECTRUM. 14 | C *** 15 | l=L2-L1+1 16 | r1=R/2 17 | r2=1-r1 18 | DO i=L1,L2 19 | xtap=(dble(i-L1)+0.5D0)/(dble(l)) 20 | IF(xtap.ge.r1.and.xtap.le.r2)THEN 21 | tap=ONE 22 | ELSE 23 | IF(xtap.lt.r1)xpi=(TWO*PI*xtap)/R 24 | IF(xtap.gt.r2)xpi=(TWO*PI*(1-xtap))/R 25 | tap=(ONE-cos(xpi))/TWO 26 | END IF 27 | X(i)=X(i)*tap 28 | END DO 29 | RETURN 30 | END 31 | -------------------------------------------------------------------------------- /tools/x13as_html/tbllog.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c Prttab - Logical vector indicating which series are to be printed 3 | c Savtab - Logical vector indicating which series are to be saved 4 | c Savfct - Logical scalar indicating if forecasts should be stored 5 | c with selected series 6 | c----------------------------------------------------------------------- 7 | LOGICAL Prttab,Savtab,Savfct,Savbct 8 | DIMENSION Prttab(NTBL),Savtab(NTBL) 9 | c----------------------------------------------------------------------- 10 | COMMON /ctbllg/Prttab,Savtab,Savfct,Savbct 11 | -------------------------------------------------------------------------------- /tools/x13as_html/tbllog.prm: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c Note NTBL (the number of tables) is half PTBL because each table 3 | c has a long and short name. In the table dictionaries the short name 4 | c is written after each long name so the 2i-1 and 2i entries relate to 5 | c table i. 6 | c----------------------------------------------------------------------- 7 | c Note: Look in filext.var to find the extension names of the files 8 | c that are saved. The variable is tbxdic. 9 | c----------------------------------------------------------------------- 10 | INTEGER NTBL 11 | PARAMETER(NTBL=396) 12 | 13 | -------------------------------------------------------------------------------- /tools/x13as_html/tdtyp.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | DOUBLE PRECISION Tdmdl,Tdmdl1,Lpmdl,Lpmdl1 3 | INTEGER Tdtbl,Tday 4 | DIMENSION Tdmdl(PTD),Tdmdl1(PTD), 5 | & Tday(PLEN),Lpmdl(2),Lpmdl1(2) 6 | c----------------------------------------------------------------------- 7 | COMMON /tdtyp / Tdtbl,Tday 8 | COMMON /cmdltd / Tdmdl,Tdmdl1,Lpmdl,Lpmdl1 9 | c----------------------------------------------------------------------- 10 | -------------------------------------------------------------------------------- /tools/x13as_html/test.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /test/ ... 3 | integer IFUNC 4 | common /test/ IFUNC 5 | -------------------------------------------------------------------------------- /tools/x13as_html/testf1.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /testf1/ ... 3 | integer IFUNC1 4 | common /testf1/ IFUNC1 5 | -------------------------------------------------------------------------------- /tools/x13as_html/tests.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | DOUBLE PRECISION Fstabl,Fmove,Fpres,Chikw,P1,P2,P3,P5,Test1,Test2 3 | INTEGER Iqfail 4 | c----------------------------------------------------------------------- 5 | COMMON /tests / Fstabl,Fmove,Fpres,Chikw,P1,P2,P3,P5,Test1,Test2, 6 | & Iqfail 7 | -------------------------------------------------------------------------------- /tools/x13as_html/tfmts.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | CHARACTER Ifmt1*(7),Ifmt2*(7),Ifmt3*(76),Colhdr*(22) 3 | INTEGER Tblwid,Nfmt1,Nfmt2 4 | DIMENSION Colhdr(PSP+2) 5 | c----------------------------------------------------------------------- 6 | COMMON /ctfmt / Tblwid,Nfmt1,Nfmt2,Ifmt1,Ifmt2,Ifmt3,Colhdr 7 | c----------------------------------------------------------------------- -------------------------------------------------------------------------------- /tools/x13as_html/tfmts.prm: -------------------------------------------------------------------------------- 1 | CHARACTER TFMDIC*771 2 | INTEGER tfmptr,PTFM 3 | PARAMETER(PTFM=24) 4 | DIMENSION tfmptr(0:PTFM) 5 | PARAMETER(TFMDIC='(2x,i4,3x,3(3(1x,@):,/,9x),3(1x,@),4x,#)(1x,a5,3 6 | &x,3(3(1x,@):,/,9x),3(1x,@))(2x,i4,4x,3(1x,@):,/,11x,@,35x,#)(1x,a5 7 | &,4x,3(1x,@):,/,11x,@)(2x,i4,3x,2(4(1x,@):,/,9x),4(1x,@),3x,#)(1x,a 8 | &5,3x,2(4(1x,@):,/,9x),4(1x,@))(2x,i4,3x,4(1x,@),3x,#)(1x,a5,3x,4(1 9 | &x,@))(2x,i4,4x,2(4(6x,@):,/,9x),4(6x,@),10x,#)(1x,a5,4x,2(4(6x,@): 10 | &,/,9x),4(6x,@))(2x,i4,4x,4(6x,@),10x,#)(1x,a5,4x,4(6x,@))(2x,i4,4x 11 | &,6(1x,@):,/,10x,6(1x,@),4x,#)(1x,a5,4x,6(1x,@):,/,10x,6(1x,@))(2x, 12 | &i4,4x,6(1x,@):,/,10x,6(1x,@),4x,#)(1x,a5,4x,6(1x,@):,/,10x,6(1x,@) 13 | &)(2x,i4,4x,8(1x,@):,/,10x,4(1x,@),56x,#)(1x,a5,4x,8(1x,@):,/,10x,4 14 | &(1x,@))(2x,i4,4x,12(1x,@),4x,#)(1x,a5,4x,12(1x,@))(2x,i4,3x,5(2(1x 15 | &,@):,/,9x),2(1x,@),4x,#)(1x,a5,3x,5(2(1x,@):,/,9x),2(1x,@)))(2x,i4 16 | &,3x,2(1x,@):,/,9x,2(1x,@),4x,#)(1x,a5,3x,2(1x,@):,/,9x,2(1x,@))') 17 | -------------------------------------------------------------------------------- /tools/x13as_html/tfmts.var: -------------------------------------------------------------------------------- 1 | DATA tfmptr / 1,41,76,109,136,176,211,234,252,293,328,352,370,408, 2 | &441,479,512,551,584,608,627,667,703,740,772 / 3 | -------------------------------------------------------------------------------- /tools/x13as_html/tfmts2.prm: -------------------------------------------------------------------------------- 1 | CHARACTER TF2DIC*752 2 | INTEGER tf2ptr,PTF2 3 | PARAMETER(PTF2=24) 4 | DIMENSION tf2ptr(0:PTF2) 5 | PARAMETER(TF2DIC='(2x,i4,3x,3(3(@,a):,/,9x),3(@,a),4x,#)(1x,a5,3x, 6 | &3(3(@,a):,/,9x),3(@,a))(2x,i4,4x,3(@,a):,/,9x,@,a,35x,#)(1x,a5,4x, 7 | &3(@,a):,/,9x,@,a1)(2x,i4,3x,2(4(@,a):,/,9x),4(@,a),3x,#)(1x,a5,3x, 8 | &2(4(@,a):,/,9x),4(@,a))(2x,i4,3x,4(@,a),3x,#)(1x,a5,3x,4(@,a))(2x, 9 | &i4,4x,2(4(5x,@,a):,/,9x),4(5x,@,a),10x,#)(1x,a5,4x,2(4(5x,@,a):,/, 10 | &9x),4(5x,@,a))(2x,i4,4x,4(5x,@,a),10x,#)(1x,a5,4x,4(5x,@,a))(2x,i4 11 | &,4x,6(@,a):,/,10x,6(@,a),4x,#)(1x,a5,4x,6(@,a):,/,10x,6(@,a))(2x,i 12 | &4,4x,6(@,a):,/,10x,6(@,a),4x,#)(1x,a5,4x,6(@,a):,/,10x,6(@,a))(2x, 13 | &i4,4x,8(@,a):,/,10x,4(@,a),56x,#)(1x,a5,4x,8(@,a):,/,10x,4(@,a))(2 14 | &x,i4,4x,12(@,a),4x,#)(1x,a5,4x,12(@,a))(2x,i4,3x,5(2(@,a):,/,9x),2 15 | &(@,a),4x,#)(1x,a5,3x,5(2(@,a):,/,9x),2(@,a)))(2x,i4,3x,2(@,a):,/,9 16 | &x,2(@,a),4x,#)(1x,a5,3x,2(@,a):,/,9x,2(@,a))') 17 | -------------------------------------------------------------------------------- /tools/x13as_html/tfmts2.var: -------------------------------------------------------------------------------- 1 | DATA tf2ptr / 1,39,72,105,133,171,204,226,243,288,327,353,373,409, 2 | &440,476,507,544,575,598,616,654,688,723,753 / 3 | -------------------------------------------------------------------------------- /tools/x13as_html/titl.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /titl/ ... 3 | character TITLEG*80 4 | common /titl/ TITLEG 5 | -------------------------------------------------------------------------------- /tools/x13as_html/title.cmn: -------------------------------------------------------------------------------- 1 | C----------------------------------------------------------------------- 2 | c Newpag - character that sets new page 3 | c Title - Title printed on each page of output 4 | c Serno - Name of series 5 | c Ttlfmt - format for title 6 | C----------------------------------------------------------------------- 7 | CHARACTER Title*(80),Serno*(64),Ttlfmt*(37) 8 | C----------------------------------------------------------------------- 9 | c Ntitle - length of title vector 10 | c Nser - length of series name 11 | C----------------------------------------------------------------------- 12 | INTEGER Ntitle,Nser 13 | C----------------------------------------------------------------------- 14 | LOGICAL Prt1ps,Lcmpaq 15 | C----------------------------------------------------------------------- 16 | COMMON /rote / Ntitle,Nser,Prt1ps,Lcmpaq 17 | COMMON /crote / Title,Serno,Ttlfmt 18 | C----------------------------------------------------------------------- 19 | 20 | -------------------------------------------------------------------------------- /tools/x13as_html/transcad.i: -------------------------------------------------------------------------------- 1 | c TransCad.i 2 | c TransLcad="TRANSITORY" or "TRADING DAY-STOCHASTIC" 3 | c TransCad="TRANS" or "TD.Stoch" 4 | character*22 transLcad,transCad 5 | integer nTransLcad,nTransCad 6 | common /transCad/ transLCad,TransCad,nTransLcad,nTransCad -------------------------------------------------------------------------------- /tools/x13as_html/tukey.cmn: -------------------------------------------------------------------------------- 1 | INTEGER Ntukey,Itukey 2 | DOUBLE PRECISION Ptsr,Ptso,Ptsa,Ptsi,Pttdr,Pttdo,Pttda,Pttdi 3 | DIMENSION Itukey(4),Ptsr(6),Ptso(6),Ptsa(6),Ptsi(6) 4 | c----------------------------------------------------------------------- 5 | COMMON /ctukey / Ptsr,Ptso,Ptsa,Ptsi,Pttdr,Pttdo,Pttda,Pttdi, 6 | & Ntukey,Itukey 7 | -------------------------------------------------------------------------------- /tools/x13as_html/unitmak.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /unitmak/ ... 3 | real*8 XL 4 | common /unitmak/ XL 5 | -------------------------------------------------------------------------------- /tools/x13as_html/units.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | C --- Mt is the input spec file 3 | C --- Mtm is the model file 4 | C --- Mt1 is the main printout 5 | C --- Mt2 is the error file 6 | C --- Ng is the file containing a summary of the run(s) 7 | C --- Nform contains the seasonal adjustment diagnostics for the run 8 | c----------------------------------------------------------------------- 9 | INTEGER Mt,Mtm,Mt1,Mt2,Nform,Ng,Mtprof 10 | COMMON /units / Mt,Mtm,Mt2,Mt1,Ng,Nform,Mtprof 11 | 12 | -------------------------------------------------------------------------------- /tools/x13as_html/urgbak.cmn: -------------------------------------------------------------------------------- 1 | c ------------------------------------------------------------------ 2 | c Backup copies of variables for user defined regressors 3 | c ------------------------------------------------------------------ 4 | LOGICAL Fxuser 5 | CHARACTER Usrtt2*(PCOLCR*PUREG) 6 | DOUBLE PRECISION Buser,Userx2 7 | INTEGER Usrty2,Ncusx2,Usrpt2 8 | DIMENSION Buser(PUREG*2),Fxuser(PUREG*2),Userx2(PUSERX*2), 9 | & Usrty2(PUREG*2),Usrpt2((PUREG+1)*2),Ncusx2(0:1), 10 | & Usrtt2(0:1) 11 | c ------------------------------------------------------------------ 12 | COMMON /usrbak/ Buser,Userx2,Ncusx2,Usrty2,Usrpt2,Usrtt2,Fxuser 13 | 14 | 15 | -------------------------------------------------------------------------------- /tools/x13as_html/usrreg.cmn: -------------------------------------------------------------------------------- 1 | c ------------------------------------------------------------------ 2 | c Usrttl - data dictionary for the names of the user-defined 3 | c regressor variables. 4 | c Usrptr - pointers for the data dictionary of the names of the 5 | c user-defined regressor variables. 6 | c Usrtyp - indicator of what type of regressor for each of the 7 | c user-defined regressor variables. 8 | c Ncusrx - Number of user-defined regression variables 9 | c Nguhl - Number of holiday groups defined withing user-defined 10 | c regression variables 11 | c ------------------------------------------------------------------ 12 | CHARACTER Usrttl*(PCOLCR*PUREG) 13 | INTEGER Usrtyp,Ncusrx,Usrptr,Nguhl 14 | DIMENSION Usrtyp(PUREG),Usrptr(0:PUREG) 15 | c ------------------------------------------------------------------ 16 | COMMON /usrreg/ Ncusrx,Usrtyp,Usrptr,Nguhl,Usrttl 17 | c ------------------------------------------------------------------ 18 | 19 | -------------------------------------------------------------------------------- /tools/x13as_html/usrxrg.cmn: -------------------------------------------------------------------------------- 1 | c ------------------------------------------------------------------ 2 | c Usrxtt - data dictionary for the names of the user-defined 3 | c regressor variables. 4 | c Usrxpt - pointers for the data dictionary of the names of the 5 | c user-defined regressor variables. 6 | c Usxtyp - indicator of what type of regressor for each of the 7 | c user-defined regressor variables. 8 | c Ncxusx - Number of user-defined regression variables 9 | c Nrxusx - Number of observations read in for the user-defined 10 | c X-11 regression variables. 11 | c ------------------------------------------------------------------ 12 | CHARACTER Usrxtt*(PCOLCR*PUREG) 13 | INTEGER Usxtyp,Ncxusx,Nrxusx,Usrxpt 14 | DIMENSION Usxtyp(PUREG),Usrxpt(0:PUREG) 15 | c ------------------------------------------------------------------ 16 | COMMON /usrxrg/ Ncxusx,Nrxusx,Usxtyp,Usrxpt,Usrxtt 17 | c ------------------------------------------------------------------ 18 | 19 | -------------------------------------------------------------------------------- /tools/x13as_html/value.f: -------------------------------------------------------------------------------- 1 | C Last change: BCM 25 Nov 97 2:22 pm 2 | **==value.f processed by SPAG 4.03F at 09:54 on 1 Mar 1994 3 | SUBROUTINE value 4 | IMPLICIT NONE 5 | c----------------------------------------------------------------------- 6 | INCLUDE 'srslen.prm' 7 | INCLUDE 'chrt.cmn' 8 | c----------------------------------------------------------------------- 9 | DOUBLE PRECISION yvalue 10 | c----------------------------------------------------------------------- 11 | yvalue=Fact1*(Xyvec-Ymin)/Ydiff 12 | Ixy=Ifact2-int(yvalue) 13 | c----------------------------------------------------------------------- 14 | RETURN 15 | END 16 | -------------------------------------------------------------------------------- /tools/x13as_html/varian.f: -------------------------------------------------------------------------------- 1 | **==varian.f processed by SPAG 4.03F at 09:54 on 1 Mar 1994 2 | DOUBLE PRECISION FUNCTION varian(X,I,J,Iopt) 3 | IMPLICIT NONE 4 | C*** Start of declarations inserted by SPAG 5 | DOUBLE PRECISION ave,X 6 | INTEGER I,Iopt,J,k 7 | C*** End of declarations inserted by SPAG 8 | C --- THIS FUNCTION COMPUTES THE VARIANCE OF X. IF IOPT = 0 COMPUTE THE 9 | C --- MEAN , IF IOPT = 1 THE MEAN IS ASSUMED TO BE ZERO, AND IF IOPT = 2 10 | C --- THE MEAN IS ASSUMED TO BE ONE. 11 | DIMENSION X(*) 12 | ave=1D0 13 | IF(Iopt.ne.2)THEN 14 | ave=0D0 15 | IF(Iopt.ne.1)THEN 16 | DO k=I,J 17 | ave=ave+X(k) 18 | END DO 19 | ave=ave/(J-I+1) 20 | END IF 21 | END IF 22 | varian=0D0 23 | DO k=I,J 24 | varian=varian+(X(k)-ave)*(X(k)-ave) 25 | END DO 26 | RETURN 27 | END 28 | -------------------------------------------------------------------------------- /tools/x13as_html/vars.f: -------------------------------------------------------------------------------- 1 | DOUBLE PRECISION FUNCTION vars(X,I,J,Iopt,Muladd) 2 | IMPLICIT NONE 3 | C----------------------------------------------------------------------- 4 | INTEGER I,Iopt,J,Muladd 5 | DOUBLE PRECISION varian,varlog,X 6 | DIMENSION X(*) 7 | C----------------------------------------------------------------------- 8 | IF(Muladd.ne.1)THEN 9 | vars=varlog(X,I,J,Iopt) 10 | RETURN 11 | END IF 12 | vars=varian(X,I,J,Iopt) 13 | RETURN 14 | END 15 | -------------------------------------------------------------------------------- /tools/x13as_html/work2.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | DOUBLE PRECISION Pbar,Autoc,Qu,Q2m2,Psq,Qual 3 | INTEGER Nn,Kfail,Nyrs 4 | LOGICAL Lstabl,L3x5 5 | DIMENSION Psq(PSP),Pbar(PSP),Autoc(PSP+2),Qu(11) 6 | c----------------------------------------------------------------------- 7 | COMMON /work2 / Pbar,Autoc,Qu,Q2m2,Psq,Qual,Nn,Kfail,Nyrs,Lstabl, 8 | & L3x5 9 | -------------------------------------------------------------------------------- /tools/x13as_html/x11msc.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c Miscellanous X-11 options added to the X-12 program as 3 | c enhancements 4 | c----------------------------------------------------------------------- 5 | c Shrtsf - Logical variable which indicates when seasonal filter 6 | c specified by user should be used for short series 7 | c Psuadd - Logical variable which indicates when pseudo-additive 8 | c seasonal adjustment is performed 9 | c Same - Logical variable which indicates when all original series 10 | c values are the same 11 | c Rvper - Logical variable which indicates that percent revisions 12 | c are used 13 | c Yr2000 - Logical variable which indicates that yrs read in from 14 | c X-11 formats that are <= 45 are assumed to be from the 15 | c 21 century; else, years are assumed to be in the 20th 16 | c century. 17 | c----------------------------------------------------------------------- 18 | LOGICAL Shrtsf,Psuadd,Same,Rvper,Yr2000,Noxfct,Tru7hn, 19 | & Lcentr 20 | COMMON /x11msc/ Shrtsf,Psuadd,Same,Rvper,Yr2000,Noxfct,Tru7hn, 21 | & Lcentr 22 | -------------------------------------------------------------------------------- /tools/x13as_html/x11ptr.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c Pos1bk - relative position of first backcast in orix vector 3 | c Pos1ob - relative position of first observation of original series in 4 | c orix vector 5 | c Posfob - relative position of final observation of original series in 6 | c orix vector 7 | c Posffc - relative position of final observation of original series 8 | c augmented by forecasts in orix vector 9 | c----------------------------------------------------------------------- 10 | INTEGER Pos1bk,Pos1ob,Posfob,Posffc 11 | c----------------------------------------------------------------------- 12 | COMMON /foscmn / Pos1bk,Pos1ob,Posfob,Posffc 13 | -------------------------------------------------------------------------------- /tools/x13as_html/x11reg.prm: -------------------------------------------------------------------------------- 1 | CHARACTER XRGDIC*91 2 | INTEGER xrgidx,xrgptr,PXRG 3 | PARAMETER(PXRG=16) 4 | DIMENSION xrgptr(0:PXRG) 5 | PARAMETER(XRGDIC='variablesuserdatastartfileformatbprintsaveuserre 6 | &gsigmacriticalusermeanumstartumfileumformat') 7 | -------------------------------------------------------------------------------- /tools/x13as_html/x11reg.var: -------------------------------------------------------------------------------- 1 | DATA xrgptr / 1,10,14,18,23,27,33,34,39,43,50,55,63,71,78,84,92 / 2 | -------------------------------------------------------------------------------- /tools/x13as_html/x11srs.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c Arrays containing the elemental components of an X-11 seasonal 3 | c adjustment 4 | c----------------------------------------------------------------------- 5 | DOUBLE PRECISION Sts,Stsi,Stc,Stci,Sti,Stc2 6 | DIMENSION Sts(PLEN),Stsi(PLEN),Stc(PLEN),Stci(PLEN),Sti(PLEN), 7 | & Stc2(PLEN) 8 | c----------------------------------------------------------------------- 9 | COMMON /x11srs / Sts,Stsi,Stc,Stc2,Stci,Sti 10 | -------------------------------------------------------------------------------- /tools/x13as_html/x11svl.i: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c Table pointer variables used for svltbl are of the form LSL 3 | c where the types are 4 | c----------------------------------------------------------------------- 5 | c M1 M1 6 | c Q Q 7 | c Q without M2 Q2 8 | c Moving seasonality ratio MSR 9 | c I/C Ratio ICR 10 | c F-test for stable seasonality, B1 FB1 11 | c F-test for stable seasonality, D8 FD8 12 | c F-test for moving seasonality, D8 MSF 13 | c----------------------------------------------------------------------- 14 | INTEGER LSLM1,LSLMSR,LSLICR,LSLFB1,LSLFD8,LSLMSF,LSLIDS,LSLALX, 15 | & LSLXTS 16 | PARAMETER( 17 | & LSLM1= 29,LSLMSR= 42,LSLICR= 43,LSLFB1= 44,LSLFD8= 45, 18 | & LSLMSF= 46,LSLIDS= 47,LSLALX= 48,LSLXTS= 49) 19 | -------------------------------------------------------------------------------- /tools/x13as_html/xarr.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /xarr/ ... 3 | integer nx 4 | real*8 x(N10) 5 | common /xarr/ x,nx 6 | -------------------------------------------------------------------------------- /tools/x13as_html/xclude.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c This is a common block used in the irregular regression 3 | c subroutines to keep track of irregular values that are excluded 4 | c from the regression. 5 | c----------------------------------------------------------------------- 6 | INTEGER Nxcld 7 | LOGICAL Rgxcld 8 | c---------------------------------------------------------------------- 9 | DIMENSION Rgxcld(PLEN) 10 | c----------------------------------------------------------------------- 11 | COMMON /xclude/ Nxcld,Rgxcld 12 | -------------------------------------------------------------------------------- /tools/x13as_html/xeastr.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | DOUBLE PRECISION Yhol,Xhol 3 | INTEGER Ieast 4 | LOGICAL Lgenx 5 | c----------------------------------------------------------------------- 6 | DIMENSION Ieast(4),Yhol(PLEN),Xhol(PLEN) 7 | c----------------------------------------------------------------------- 8 | COMMON /xyser / Yhol,Xhol,Ieast,Lgenx 9 | c----------------------------------------------------------------------- 10 | -------------------------------------------------------------------------------- /tools/x13as_html/xrgfct.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c Nfcstx - number of forecasts 3 | c Nbcstx - number of backcasts 4 | c Ladd1x - logical variable indicating whether outliers will be 5 | c added one at a time 6 | c----------------------------------------------------------------------- 7 | LOGICAL Ladd1x 8 | INTEGER Nfcstx,Nbcstx 9 | c----------------------------------------------------------------------- 10 | common /cx11fc/ Nfcstx,Nbcstx,Ladd1x 11 | 12 | -------------------------------------------------------------------------------- /tools/x13as_html/xrgum.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c variables associated with the user defined mean used in the 3 | c x11regression spec 4 | c----------------------------------------------------------------------- 5 | LOGICAL Haveum,Noxfac 6 | DOUBLE PRECISION Umean 7 | INTEGER Begum 8 | c----------------------------------------------------------------------- 9 | DIMENSION Umean(PLEN),Begum(2) 10 | c----------------------------------------------------------------------- 11 | COMMON /cxrum / Umean,Begum,Haveum,Noxfac 12 | 13 | -------------------------------------------------------------------------------- /tools/x13as_html/xtdtyp.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | DOUBLE PRECISION Tdx11,Tdx11b,Xn,Xnstar,Xlpyr,Daybar,Kvec 3 | DIMENSION Tdx11(PTD),Tdx11b(PTD),Kvec(PLEN),Xn(PLEN),Xlpyr(PLEN), 4 | & Xnstar(PLEN) 5 | c----------------------------------------------------------------------- 6 | COMMON /cx11td / Tdx11,Tdx11b 7 | COMMON /tdvec / Xn,Xnstar,Xlpyr,Daybar 8 | COMMON /kvcmn / Kvec 9 | c----------------------------------------------------------------------- 10 | -------------------------------------------------------------------------------- /tools/x13as_html/xtrm.cmn: -------------------------------------------------------------------------------- 1 | c----------------------------------------------------------------------- 2 | c arrays and variables for X-11 extreme value procedure 3 | c----------------------------------------------------------------------- 4 | c Csigvc - Logical variable which indicates when calendarsigma is 5 | c used 6 | c Stdper - standard errors for different months (or quarters) used 7 | c in Bundesbank extreme value replacement procedure 8 | c----------------------------------------------------------------------- 9 | DOUBLE PRECISION Stwt,Stdper,Stdev 10 | c----------------------------------------------------------------------- 11 | c Ksdev - Indicator for Budesbank outlier procedure 12 | c Kersa - Indicator variable used in Budesbank outlier procedure 13 | c----------------------------------------------------------------------- 14 | INTEGER Ksdev,Kersa 15 | LOGICAL Csigvc 16 | c----------------------------------------------------------------------- 17 | DIMENSION Stwt(PLEN),Stdev(PYRS+1),Stdper(PSP),Csigvc(PSP) 18 | c----------------------------------------------------------------------- 19 | COMMON /cxtrm / Stwt,Stdev,Stdper,Ksdev,Kersa,Csigvc 20 | -------------------------------------------------------------------------------- /tools/x13as_html/xxxs.i: -------------------------------------------------------------------------------- 1 | C 2 | C... Variables in Common Block /xxx/ ... 3 | character COMPILA*180 4 | common /xxx/ COMPILA 5 | --------------------------------------------------------------------------------