Hello everyone,<br>I&#39;m working to get some predictions using ARIMA model in R. This is the code I&#39;m using, at it works as expected:<br><br><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">

library(TSA)<br>load(&#39; path... /R/i686-pc-linux-gnu-library/2.14/TSA/data/airpass.rda&#39;)<br>show(airpass)<br>m &lt;- arima(airpass,order=c(0,1,12),seasonal=list(order=c(0,1,1),period=24))<br>m<br>plot(m,n.ahead=72,xlab=&#39;Time&#39;,type=&#39;o&#39;,ylab=&#39;Passengers&#39;)<br>

abline(h=0)<br></blockquote><br>I use example data from the TSA package, and the prediction is plotted well.<br>The issue is that what I really want is use it within a bigger C++ project, so I need to use RInside package. I&#39;ve tested every example of RInside, and it seems perfectly operative in my machine.<br>

I have programmed it like this:<br><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">//Ejemplo que carga los datos airpass.rda del package TSA y realiza una prediccion ARIMA sobre ellos<br>

#include &lt;RInside.h&gt;                            // for the embedded R via RInside<br>int main(int argc, char *argv[]) {<br>    RInside R(argc, argv);                      // create an embedded R instance<br>    std::string evalstr = &quot;library(TSA); load(&#39; ...path... /R/i686-pc-linux-gnu-library/2.14/TSA/data/airpass.rda&#39;); show(airpass);&quot;; //Cargamos la libreria TSA necesaria y el archivo de datos<br>

    R.parseEvalQ(evalstr);<br>    std::string evalstr2 = &quot;m &lt;- arima(airpass,order=c(0,1,12),seasonal=list(order=c(0,1,1),period=24)); m&quot;; //Calculo de la prediccion sobre los datos. Coeficientes manualmente precalculados<br>

    R.parseEvalQ(evalstr2);<br>    std::string evalstr3 = &quot;plot(m,n.ahead=72,xlab=&#39;Tiempo&#39;,type=&#39;o&#39;,ylab=&#39;Pasajeros&#39;); abline(h=0)&quot;; //Dibujamos los datos y la prediccion.<br>    R.parseEvalQ(evalstr3);<br>

    std::string evalstr4 = &quot;cat(&#39;AIC del modelo:\n&#39;); m$aic&quot;; //Muestra el estimador de bondad AIC<br>    R.parseEvalQ(evalstr4);<br><br>    exit(0);<br>}<br></blockquote><div>(The comments are in spanish, sorry)<br>

When I run this code, the output of the first evalstr is the same that in R. TSA &amp; airpass are loaded correctly. But the next line seems not to work.<br>It tooks several seconds calculating arima model, but it the problem is that &quot;m&quot; command to show the model produces no output, the same that &quot;m$aic&quot;. With &quot;no output&quot; I mean nothing (including any error).<br>

I can&#39;t get the graphic too, but I know that maybe I would have to plot to a file to get it work. The problem is that I also get no error. This is the output of my code (there are some warning lines at the beginning, but the rest of examples always worked with the same lines):<br>

<blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">During startup - Warning messages:<br>1: Setting LC_CTYPE failed, using &quot;C&quot; <br>2: Setting LC_COLLATE failed, using &quot;C&quot; <br>

3: Setting LC_TIME failed, using &quot;C&quot; <br>4: Setting LC_MESSAGES failed, using &quot;C&quot; <br>5: Setting LC_PAPER failed, using &quot;C&quot; <br>6: Setting LC_PAPER failed, using &quot;C&quot; <br>7: Setting LC_MEASUREMENT failed, using &quot;C&quot; <br>

Loading required package: leaps<br>Loading required package: locfit<br>Loading required package: akima<br>Loading required package: lattice<br>locfit 1.5-6      2010-01-20 <br>Loading required package: mgcv<br>This is mgcv 1.7-9. For overview type &#39;help(&quot;mgcv-package&quot;)&#39;.<br>

Loading required package: tseries<br>Loading required package: quadprog<br>Loading required package: zoo<br><br>Attaching package: &#39;zoo&#39;<br><br>The following object(s) are masked from &#39;package:base&#39;:<br><br>

    as.Date, as.Date.numeric<br><br><br>Attaching package: &#39;TSA&#39;<br><br>The following object(s) are masked from &#39;package:stats&#39;:<br><br>    acf, arima<br><br>The following object(s) are masked from &#39;package:utils&#39;:<br>

<br>    tar<br><br>     Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec<br>1960 112 118 132 129 121 135 148 148 136 119 104 118<br>1961 115 126 141 135 125 149 170 170 158 133 114 140<br>1962 145 150 178 163 172 178 199 199 184 162 146 166<br>

1963 171 180 193 181 183 218 230 242 209 191 172 194<br>1964 196 196 236 235 229 243 264 272 237 211 180 201<br>1965 204 188 235 227 234 264 302 293 259 229 203 229<br>1966 242 233 267 269 270 315 364 347 312 274 237 278<br>

1967 284 277 317 313 318 374 413 405 355 306 271 306<br>1968 315 301 356 348 355 422 465 467 404 347 305 336<br>1969 340 318 362 348 363 435 491 505 404 359 310 337<br>1970 360 342 406 396 420 472 548 559 463 407 362 405<br>

1971 417 391 419 461 472 535 622 606 508 461 390 432<br>AIC del modelo:<br></blockquote><div> </div><div>I have tried everything that came to my mind, and I have no more ideas! I think I have explained my best, hope somebody can help me with this.<br>

Sorry if I made some language mistake ;) Thank you very much!<br></div></div>