title: Reproduce OxMetrics' ARFIMA model in R
body: <p>I am working to reproduce some results from OxMetrics (<a href="http://www.timberlake.co.uk/software/oxmetrics.html#ox-pro" rel="nofollow">Ox Professional version 7.10</a>) in R, but I am having a hard time figuring out exactly I get the right specification in R. I do not expect to get identical estimates, but somewhat similar estimates should be possible (see below for estimates from OxMetrics and from R).</p>
  
  <p>Can anyone here help me figuring out how I do what OxMetrics does in R?</p>
  
  <p>I've tried using <code>forecast::arfima</code>, <code>forecast::Arima</code>, <code>fracdiff::fracdiff</code>, and <code>arfima::arfima</code> So far I came closest with the latter.</p>
  
  <p>Below is data and code,</p>
  
  <p>The blow results is from is from OxMetrics ARFIMA(2,0,2) model estimated using  Maximum likelihood and from R using <code>arfima</code> from the <code>arfima</code> package (code blow the longer data string).</p>
  
  <pre><code>           OxMetrics         R (using arfima()]
  AR         1.41763           1.78547    
  AR        -0.51606          -0.79782 
  MA        -0.89892          -0.08406
  MA         0.30821           0.48083
  Constant  -0.09382          -0.09423
  
  y &lt;- c(-0.0527281830620101, -0.0483283435220523,
  -0.0761110069836706, -0.0425588714546148,
  -0.0629789511239869, -0.118944956578757, 
  -0.156545103342326, -0.138106089421937,
  -0.107335059908618, -0.145013381825552, 
  -0.100753517322066, -0.0987268545186417,
  -0.0454663306471916, -0.0404439816954447,
  -0.110574863632305, -0.0933955365797221,
  -0.0915045759209185, -0.110397691370645,
  -0.0944201704700927, -0.121257467376357,
  -0.109785472344257, -0.0890776818684245, 
  -0.0554059943242384, -0.0700566531543618,
   -0.0366694695635905, -0.0687369752462432,
  -0.0651380598746858, -0.134224646388692, 
  -0.0670924768348229, -0.0835771023087037,
  -0.0709997877276756, -0.116003735777656,
  -0.0794873243023737, -0.067057402058551, 
  -0.0698663891865543, -0.0511133873895728,
  -0.0513203609998669, -0.0894001277309737,
  -0.0398284483421012, -0.0514468502511471, 
  -0.0599700163953942, -0.0661889418696937,
  -0.079516218903545, -0.0685966077135509,
  -0.0861445337428064, -0.0923966209966709, 
  -0.133444703431511, -0.131567692883267,
  -0.127157375630663, -0.136327904368355, 
  -0.102133208996487, -0.109453799095327,
  -0.103333580486325, -0.0982528240902063, 
  -0.139243862997714, -0.112067682286408,
  -0.0741501704478233, -0.0885574830826608,
  -0.0819203358523941, -0.0891168040724528, 
  -0.0331415164887199, -0.038039022334333,
  0.000471320939768205, -0.0250547289467331,
  -0.0411983586070352, -0.0463752713008887, 
  -0.0184870766950889, -0.0318185253129144,
  -0.0623828610377037, -0.0718563679309012,
  -0.0635702270765757, -0.0929728977267059, 
  -0.0894248292570765, -0.0919046741661464,
  -0.0844700793317346, -0.112800098282505,
  -0.141344968548085, -0.127965917566584,
  -0.143980868315393, -0.154901662762077,
  -0.130634570152671, -0.150417664726561,
  -0.163723312802416, -0.146099566906346,
  -0.14837251795191, -0.144887288973472,
  -0.14232221415307, -0.142825446351853,
  -0.158838097005599, -0.14340614330986,
  -0.118935233992604, -0.109627188482776,
  -0.120889714109902, -0.119484146944083,
  -0.0950435556738212, -0.134667374330086,
  -0.155051119642286, -0.134094795193097,
  -0.128627607285988, -0.133954472488274,
  -0.119286541395138, -0.135714339904381,
  -0.0903767618937357, -0.109592987693797,
  -0.0770998518949151, -0.108375176935532, 
  -0.136901231908067, -0.0856673865524131,
  -0.108854388315838, -0.0708359081737591,
  -0.106961434062811, -0.0429126711978416, 
  -0.0550592121225453, -0.0715845951018634,
  -0.0509376225313689, -0.0570175197192393,
  -0.0724229547086495, -0.0867303057832318, 
  -0.089712447506396, -0.125158029708487,
  -0.122260116350003, -0.0905629436620448, 
  -0.090357598491857, -0.097173095034008,
  -0.0674973361276239, -0.12411935716644,
  -0.0957789729967162, -0.088838044599159,
  -0.110065127067576, -0.108172925482296)
  
  # install.packages(c("arfima"), dependencies = TRUE)
  # library(arfima)
  arfima::arfima(y, order = c(2, 0, 2))
  </code></pre>