<p class="MsoNormal"><span style="font-size:10.0pt;line-height:115%;font-family:"Times New Roman","serif"">Hola y feliz año,</span></p>

<p class="MsoNormal" style="text-align:justify"><span style="font-size:10.0pt;line-height:115%;font-family:"Times New Roman","serif"">Estoy trabajando por
primera vez (igual ando muy pérdido) con el paquete forecast (modelos ARIMA)(Hyndman
y Khandakar 2008) y utilizo series mensuales de compañías aéreas. Estoy
intentando analizar el impacto de algunos de los acontecimientos que han podido
influir en la variable ingresos por viajero transportado (p.e el atentado del
11 de septiembre, crisis de la ceniza abril-mayo 2010, crisis). He probado con
diferentes modelos pero no acabo de ver el impacto. Lo que hago es:</span></p>

<p class="MsoListParagraphCxSpFirst" style="text-align:justify"><span style="font-size:10.0pt;line-height:115%;font-family:"Times New Roman","serif"">1)<span style="font:7.0pt "Times New Roman"">      
</span></span><span style="font-size:10.0pt;line-height:115%;font-family:"Times New Roman","serif"">Estimar el modelo ARIMA</span></p>

<p class="MsoListParagraphCxSpMiddle" style="text-align:justify"><span style="font-size:10.0pt;line-height:115%;font-family:"Times New Roman","serif"">2)<span style="font:7.0pt "Times New Roman"">      
</span></span><span style="font-size:10.0pt;line-height:115%;font-family:"Times New Roman","serif"">Contruir una/s variables de impulso (también
escalón)</span></p>

<p class="MsoListParagraphCxSpLast" style="text-align:justify"><span style="font-size:10.0pt;line-height:115%;font-family:"Times New Roman","serif"">3)<span style="font:7.0pt "Times New Roman"">      
</span></span><span style="font-size:10.0pt;line-height:115%;font-family:"Times New Roman","serif"">Comparar modelos</span></p>

<p class="MsoBodyText" style="text-align:justify"><span style="font-size:8.0pt;font-family:"Courier New"">He probado diferentes
variantes. Parece que el modelo 4 (al final) mejora los resultados.(Parece que los
modelos ARIMA con variables exógenas funcionan bien con un sólo input)</span></p>

<p class="MsoBodyText"><span style="font-size:8.0pt;font-family:"Courier New"">*\crisis=dummy 1 si t>2007 (variable escalón); 0
otro caso</span></p>

<p class="MsoBodyText"><span style="font-size:8.0pt;font-family:"Courier New"">*\sars(pandemia y 11s) y cen(volcán): dummies
sars=> 1 si t>2000 & t<2004 0 otro caso ; dummy cen=>1 si
t=abril y mayo 2010 0 otro caso.</span></p>

<p class="MsoBodyText"><span style="font-size:8.0pt;font-family:"Courier New"">*\Modelo_1</span></p>

<p class="MsoBodyText"><span style="font-size:8.0pt;font-family:"Courier New"">xreg<-model.matrix(~as.factor(crisis)) </span></p>

<p class="MsoBodyText"><b><span style="font-size:8.0pt;font-family:"Courier New";color:#0070c0">model1</span></b><span style="font-size:8.0pt;font-family:"Courier New""> </span><span lang="EN-US" style="font-size:8.0pt;font-family:"Courier New""><-
Arima(Y_IB, order=c(0,1,1), seasonal=list(order=c(0,1,1)), xreg=xreg) </span></p>

<p class="MsoBodyText"><span style="font-size:8.0pt;font-family:"Courier New"">*\Modelo_2</span></p>

<p class="MsoBodyText"><span style="font-size:8.0pt;font-family:"Courier New"">xreg<-model.matrix(~as.factor(sars)+~as.factor(cen))</span></p>

<p class="MsoBodyText"><b><span lang="EN-US" style="font-size:8.0pt;font-family:"Courier New";color:#0070c0">model2</span></b><span lang="EN-US" style="font-size:8.0pt;font-family:"Courier New"">
<- Arima(Y_IB, order=c(0,1,1), seasonal=list(order=c(0,1,1), period=12),
xreg=xreg) </span></p>

<p class="MsoBodyText"><span style="font-size:8.0pt;font-family:"Courier New"">*\Modelo_3</span></p>

<p class="MsoBodyText"><span lang="EN-US" style="font-size:8.0pt;font-family:"Courier New"">xreg<-model.matrix(~as.factor(sars)+~as.factor(crisis)+~as.factor(cen))
</span></p>

<p class="MsoBodyText"><b><span lang="EN-US" style="font-size:8.0pt;font-family:"Courier New";color:#0070c0">model3</span></b><span lang="EN-US" style="font-size:8.0pt;font-family:"Courier New"">
<- Arima(Y_IB, order=c(0,1,1), seasonal=list(order=c(0,1,1), period=12),
xreg=xreg)</span></p>

<p class="MsoBodyText" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:8.0pt;font-family:"Courier New"">*\Comparación </span></p>

<h1 style="margin-top:0cm"><span lang="EN-US" style="font-size:8pt;font-family:'Courier New';font-weight:normal">ACC
<- rbind.fill(data.frame(t(accuracy(model))),</span></h1>

<p class="MsoList2CxSpFirst"><span lang="EN-US" style="font-size:8pt;line-height:115%;font-family:'Courier New'">data.frame(t(accuracy(model1))),</span></p>

<p class="MsoList2CxSpLast"><span lang="EN-US" style="font-size:8pt;line-height:115%;font-family:'Courier New'">data.frame(t(accuracy(model2)))</span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:8pt;font-family:'Courier New'">                )</span></p>

<p class="MsoListCxSpFirst"><span lang="EN-US" style="font-size:8pt;line-height:115%;font-family:'Courier New'">ACC <- round(ACC,2)</span></p>

<p class="MsoListCxSpMiddle"><span lang="EN-US" style="font-size:8pt;line-height:115%;font-family:'Courier New'">ACC <- cbind(Type=c(‘Model1’,’Model2’,’Model3’),ACC)</span></p>

<p class="MsoListCxSpLast"><span lang="EN-US" style="font-size:8pt;line-height:115%;font-family:'Courier New'">ACC[order(ACC$MAE),]</span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:8pt;font-family:'Courier New'">Type      ME   RMSE  
 MAE   MPE  MAPE
MASE</span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:8pt;font-family:'Courier New'">Model2 -8.88 127.93 95.84 -0.29 2.47 0.43</span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:8pt;font-family:'Courier New'">Model3 -8.81 127.90 95.90 -0.29 2.48 0.43</span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:8pt;font-family:'Courier New'">Model1 -7.87 128.72 97.51 -0.26 2.52 0.44</span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:8pt;font-family:'Courier New'">con modelo 2 ó 3 de forma gráfica no queda muy claro (adjunto gráfico) </span></p>

<p class="MsoBodyText"><span style="font-size:8.0pt;font-family:"Courier New"">*\Modelo_4</span></p>

<p class="MsoBodyText"><span style="font-size:8.0pt;font-family:"Courier New"">xreg<-model.matrix(~as.factor(cen)) </span></p>

<p class="MsoBodyText"><b><span lang="EN-US" style="font-size:8.0pt;font-family:"Courier New";color:#0070c0">model4</span></b><span lang="EN-US" style="font-size:8.0pt;font-family:"Courier New"">
<- Arima(Y_IB, order=c(0,1,1), seasonal=list(order=c(0,1,1), period=12),
xreg=xreg) </span></p>

<p class="MsoBodyText"><span lang="EN-US" style="font-size:8.0pt;font-family:"Courier New"">plot(Y_IB)
</span></p>

<p class="MsoBodyText"><span style="font-size:8.0pt;font-family:"Courier New"">lines(fitted(model4),col=2):(de forma gráfica no se
aprecia muy bien)</span></p>

<p class="MsoBodyText"><span style="font-size:8.0pt;font-family:"Courier New"">fitted(model4) *\comparo con los valores originales
en este caso de Ibería (Y_IB)</span></p><div><table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="205" style="width:153.6pt;margin-left:3.5pt;border-collapse:collapse">
 <tbody><tr style="height:12.75pt">
  <td width="75" nowrap valign="bottom" style="width:56.0pt;padding:0cm 3.5pt 0cm 3.5pt;height:12.75pt"></td>
  <td width="65" nowrap valign="bottom" style="width:48.8pt;padding:0cm 3.5pt 0cm 3.5pt;height:12.75pt">
  <p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span style="font-size:10.0pt;font-family:"Times New Roman","serif"">Y_IB</span></p>
  </td>
  <td width="65" nowrap valign="bottom" style="width:48.8pt;padding:0cm 3.5pt 0cm 3.5pt;height:12.75pt">
  <p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span style="font-size:10.0pt;font-family:"Times New Roman","serif"">Model4</span></p>
  </td>
 </tr>
 <tr style="height:12.75pt">
  <td width="75" nowrap valign="bottom" style="width:56.0pt;padding:0cm 3.5pt 0cm 3.5pt;height:12.75pt">
  <p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span style="font-size:10.0pt;font-family:"Times New Roman","serif"">Abril_2010</span></p>
  </td>
  <td width="65" nowrap valign="bottom" style="width:48.8pt;padding:0cm 3.5pt 0cm 3.5pt;height:12.75pt">
  <p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span style="font-size:10.0pt;font-family:"Times New Roman","serif"">4024</span></p>
  </td>
  <td width="65" nowrap valign="bottom" style="width:48.8pt;padding:0cm 3.5pt 0cm 3.5pt;height:12.75pt">
  <p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span style="font-size:10.0pt;font-family:"Times New Roman","serif"">3997.621</span></p>
  </td>
 </tr>
 <tr style="height:12.75pt">
  <td width="75" nowrap valign="bottom" style="width:56.0pt;padding:0cm 3.5pt 0cm 3.5pt;height:12.75pt">
  <p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span style="font-size:10.0pt;font-family:"Times New Roman","serif"">Mayo_2010</span></p>
  </td>
  <td width="65" nowrap valign="bottom" style="width:48.8pt;padding:0cm 3.5pt 0cm 3.5pt;height:12.75pt">
  <p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span style="font-size:10.0pt;font-family:"Times New Roman","serif"">4206</span></p>
  </td>
  <td width="65" nowrap valign="bottom" style="width:48.8pt;padding:0cm 3.5pt 0cm 3.5pt;height:12.75pt">
  <p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span style="font-size:10.0pt;font-family:"Times New Roman","serif"">3954.679</span></p>
  </td>
 </tr>
 <tr style="height:12.75pt">
  <td width="75" nowrap valign="bottom" style="width:56.0pt;padding:0cm 3.5pt 0cm 3.5pt;height:12.75pt">
  <p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span style="font-size:10.0pt;font-family:"Times New Roman","serif"">Junio_2010</span></p>
  </td>
  <td width="65" nowrap valign="bottom" style="width:48.8pt;padding:0cm 3.5pt 0cm 3.5pt;height:12.75pt">
  <p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span style="font-size:10.0pt;font-family:"Times New Roman","serif"">4437</span></p>
  </td>
  <td width="65" nowrap valign="bottom" style="width:48.8pt;padding:0cm 3.5pt 0cm 3.5pt;height:12.75pt">
  <p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span style="font-size:10.0pt;font-family:"Times New Roman","serif"">4403.932</span></p>
  </td>
 </tr>
 <tr style="height:12.75pt">
  <td width="75" nowrap valign="bottom" style="width:56.0pt;padding:0cm 3.5pt 0cm 3.5pt;height:12.75pt">
  <p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span style="font-size:10.0pt;font-family:"Times New Roman","serif"">Julio_2010</span></p>
  </td>
  <td width="65" nowrap valign="bottom" style="width:48.8pt;padding:0cm 3.5pt 0cm 3.5pt;height:12.75pt">
  <p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span style="font-size:10.0pt;font-family:"Times New Roman","serif"">4966</span></p>
  </td>
  <td width="65" nowrap valign="bottom" style="width:48.8pt;padding:0cm 3.5pt 0cm 3.5pt;height:12.75pt">
  <p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span style="font-size:10.0pt;font-family:"Times New Roman","serif"">4770.645</span></p>
  </td>
 </tr>
 <tr style="height:12.75pt">
  <td width="75" nowrap valign="bottom" style="width:56.0pt;padding:0cm 3.5pt 0cm 3.5pt;height:12.75pt">
  <p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span style="font-size:10.0pt;font-family:"Times New Roman","serif"">Agos_2010</span></p>
  </td>
  <td width="65" nowrap valign="bottom" style="width:48.8pt;padding:0cm 3.5pt 0cm 3.5pt;height:12.75pt">
  <p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span style="font-size:10.0pt;font-family:"Times New Roman","serif"">4914</span></p>
  </td>
  <td width="65" nowrap valign="bottom" style="width:48.8pt;padding:0cm 3.5pt 0cm 3.5pt;height:12.75pt">
  <p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span style="font-size:10.0pt;font-family:"Times New Roman","serif"">4898.686</span></p>
  </td>
 </tr>
 <tr style="height:12.75pt">
  <td width="75" nowrap valign="bottom" style="width:56.0pt;padding:0cm 3.5pt 0cm 3.5pt;height:12.75pt">
  <p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span style="font-size:10.0pt;font-family:"Times New Roman","serif"">Sept_2010</span></p>
  </td>
  <td width="65" nowrap valign="bottom" style="width:48.8pt;padding:0cm 3.5pt 0cm 3.5pt;height:12.75pt">
  <p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span style="font-size:10.0pt;font-family:"Times New Roman","serif"">4474</span></p>
  </td>
  <td width="65" nowrap valign="bottom" style="width:48.8pt;padding:0cm 3.5pt 0cm 3.5pt;height:12.75pt">
  <p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span style="font-size:10pt;font-family:'Times New Roman',serif">4567.054</span></p>
  </td>
 </tr>
 <tr style="height:12.75pt">
  <td width="75" nowrap valign="bottom" style="width:56.0pt;padding:0cm 3.5pt 0cm 3.5pt;height:12.75pt">
  <p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span style="font-size:10.0pt;font-family:"Times New Roman","serif"">Oct_2010</span></p>
  </td>
  <td width="65" nowrap valign="bottom" style="width:48.8pt;padding:0cm 3.5pt 0cm 3.5pt;height:12.75pt">
  <p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span style="font-size:10.0pt;font-family:"Times New Roman","serif"">4566</span></p>
  </td>
  <td width="65" nowrap valign="bottom" style="width:48.8pt;padding:0cm 3.5pt 0cm 3.5pt;height:12.75pt">
  <p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span style="font-size:10pt;font-family:'Times New Roman',serif">4524.261</span></p>
  </td>
 </tr>
 <tr style="height:12.75pt">
  <td width="75" nowrap valign="bottom" style="width:56.0pt;padding:0cm 3.5pt 0cm 3.5pt;height:12.75pt">
  <p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span style="font-size:10.0pt;font-family:"Times New Roman","serif"">Nov_2010</span></p>
  </td>
  <td width="65" nowrap valign="bottom" style="width:48.8pt;padding:0cm 3.5pt 0cm 3.5pt;height:12.75pt">
  <p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span style="font-size:10.0pt;font-family:"Times New Roman","serif"">4022</span></p>
  </td>
  <td width="65" nowrap valign="bottom" style="width:48.8pt;padding:0cm 3.5pt 0cm 3.5pt;height:12.75pt">
  <p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span style="font-size:10pt;font-family:'Times New Roman',serif">4112.943</span></p>
  </td>
 </tr>
 <tr style="height:12.75pt">
  <td width="75" nowrap valign="bottom" style="width:56.0pt;padding:0cm 3.5pt 0cm 3.5pt;height:12.75pt">
  <p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span style="font-size:10.0pt;font-family:"Times New Roman","serif"">Dic_2010</span></p>
  </td>
  <td width="65" nowrap valign="bottom" style="width:48.8pt;padding:0cm 3.5pt 0cm 3.5pt;height:12.75pt">
  <p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span style="font-size:10.0pt;font-family:"Times New Roman","serif"">3993</span></p>
  </td>
  <td width="65" nowrap valign="bottom" style="width:48.8pt;padding:0cm 3.5pt 0cm 3.5pt;height:12.75pt">
  <p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span style="font-size:10.0pt;font-family:"Times New Roman","serif"">4071.653</span></p>
  </td>
 </tr>
</tbody></table>

<p class="MsoNormal" style="text-align:justify"><span style="font-family:"Times New Roman","serif""> </span><span style="font-family:'Times New Roman',serif"> </span><span style="font-family:'Times New Roman',serif">Alguien podría ayudarme.</span></p>


<p class="MsoNormal" style="text-align:justify"><span style="font-family:"Times New Roman","serif"">Gracias
por anticipado</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-family:"Times New Roman","serif"">Justo</span></p></div>