<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE id=ridTitle>Glaciar</TITLE><BASE
href="file://C:\Archivos de programa\Archivos comunes\Microsoft Shared\Stationery\">
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<STYLE>BODY {
        MARGIN-TOP: 20px; FONT-SIZE: 10pt; MARGIN-LEFT: 50px; COLOR: #006666; FONT-FAMILY: Arial, Helvetica
}
</STYLE>
<META content="MSHTML 6.00.2900.2802" name=GENERATOR></HEAD>
<BODY id=ridBody bgColor=#ffffff
background=cid:00cf01c64108$4b106fb0$6601a8c0@BIOEF.ORG>
<DIV>Dear R-users, </DIV>
<DIV>Thanks Spencer for your suggestion, i think we are near but still that is
not what i am looking for. <BR>I think I was not clear using that notation
for the impact: <STRONG>(yt= d * yt-1 + w * It ), </STRONG>this yt is not my
original series, it is only the impact, </DIV>
<DIV>the series would be modeled as <STRONG>Yt=yt +Nt</STRONG>, with<STRONG>
yt</STRONG> the impact written above and <STRONG>Nt the ARIMA part</STRONG> of
the model. Hence, <STRONG>Yt</STRONG> is the series (your lh), and
<STRONG>yt </STRONG>the impact. </DIV>
<DIV> </DIV>
<DIV>With your suggestion</DIV>
<DIV><FONT color=#ff0000>IntReg <- cbind(It=(1:48)>20,
It.w=((1:48)>20)*(1:48), It.lh=((1:48)>20)*c(0, lh[-48])
)<BR>arima(lh, order = c(1,0,0), xreg=IntReg)</FONT></DIV><FONT color=#ff0000>
<DIV><BR></FONT><FONT color=#008080> I would have for the original series
Yt=lh(t)</FONT></DIV>
<DIV><FONT color=#008080></FONT> </DIV>
<DIV><FONT color=#ff0000>lh(20)=0 + Nt.</FONT></DIV>
<DIV><FONT color=#ff0000>lh(21)=w + beta1*21 + beta2*lh(20) + Nt</FONT></DIV>
<DIV><FONT color=#ff0000>lh(22)=w + beta1*22 + beta2*lh(21) + Nt</FONT></DIV>
<DIV><FONT color=#ff0000>etc. </FONT></DIV>
<DIV><FONT color=#ff0000> </DIV></FONT>
<DIV>What I am trying to model is a gradual permanent impact, which would lead
to:</DIV>
<DIV> </DIV>
<DIV><FONT color=#0000ff>lh(t)= impact(t) + Nt</FONT></DIV>
<DIV>
<DIV><FONT color=#0000ff>lh(t)= w*It + d*yt-1 + Nt</FONT></DIV></DIV>
<DIV><FONT color=#0000ff></FONT> </DIV>
<DIV><FONT color=#0000ff>lh(20)= 0+ Nt </FONT></DIV>
<DIV><FONT color=#0000ff>lh(21)= w + Nt</FONT></DIV>
<DIV><FONT color=#0000ff>lh(22)= d*w + w + Nt</FONT></DIV>
<DIV>
<DIV><FONT color=#0000ff>lh(22)= (d^2)*w + d*w + w + Nt</FONT></DIV></DIV>
<DIV><FONT color=#0000ff>...</FONT></DIV>
<DIV><FONT color=#0000ff>lh(n)=(d^n)*w +(d^(n-1))*w +....+(d^2)*w + d*w + w
+ Nt, which asymptoticaly would be = w/(1-d) + Nt.</FONT></DIV>
<DIV> </DIV>
<DIV>In that way, I can model the impact not only as an abrupt permanent impact
(like a "step") but also as a gradual permanent impact (which grows
gradually, as a linear trend or as a parabolic grow trend, or whatever)
with just two parameters. In SAS they are called denominator factors for
transfer functions for an input series. I also would like to modelize an abrupt
temporary impact (a high pick in the moment of the impact decreasing gradually
after it), but hopefully that will be easy after knowing the
first.....</DIV>
<DIV> </DIV>
<DIV>Any suggestion for implementing this would be very very well
received!!<BR>Thank a lot in advance,</DIV>
<DIV><BR>Berta.</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>################ answer of Spencer .####################</DIV>Does the
following illustrate the kind of interevention model you want<BR><BR>IntReg
<- cbind(It=(1:48)>20,
It.w=((1:48)>20)*(1:48),<BR>
It.lh=((1:48)>20)*c(0, lh[-48]) )<BR> arima(lh,
order = c(1,0,0), xreg=IntReg)<BR> hope this helps.<BR> spencer
graves<BR><BR>Berta wrote:<BR><BR>> Hi R-users,<BR>> <BR>> I am
using arima to fit a time series. Now I <BR>would like to include an
intervention component<BR>"It (0 before intervention, 1 after)"
using<BR>different types of impacts, that is, not only<BR>trying the simple
abrupt permanent impact (yt =<BR>w It ) with the xreg option but also trying
with<BR>a gradual permanent impact (yt= d * yt-1 + w * It ),<BR>following the
filosophy of Box and Tiao (1975).<BR>Intervention analysis with applications to
economic<BR>and environmental problems. JASA 70: 70-92.<BR>> <BR>> Does
anybody know where could I find how to <BR>incorporate them using the arima
comand (or other),<BR>or a statistical package which can incorporate it?<BR>>
<BR>> Thanks, <BR>> <BR>> Berta.<BR>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV></BODY></HTML>