# [R] AR(2) coefficient interpretation

Gerard M. Keogh GMKeogh at justice.ie
Wed Dec 24 12:02:12 CET 2008

```Stephen,

when I think about you're problem I'm a little worried as it should be is
very simple.
If you think of a the more straightforward AR(1) model y_t = a0 + b*y_t-1
the intercept is the the value y_t=a0 on the scatterplot of y_t vs. y_t-1.
For your first series labelled "a" for example the scatter plot (in Excel)
shows that this intercept computed using the linest function is about
57,000,000.

For the 2-d regression y_t on y_t-1 and y_t-2 there are only 9 data points
and the ls parameters are

b1       b2         a0

(Embedded image moved to file: pic10548.jpg)

This gives quite  good fit to the data - the lm model in R should give the
same values (I havn't tried it).
Try it and see if the coeffs agree with arima - if not, it may be there's
something funny going on in arima in R.
So you want an AR model and you're unsure of arima use lm on lagged values.

Gerard

"Stephen Oman"
<stephen.oman at gma
il.com>                                                    To
"Gerard M. Keogh"
23/12/2008 13:40          <GMKeogh at justice.ie>
cc

Subject
Re: [R] AR(2) coefficient
interpretation

Hi Gerard,

Thank you for your reply. My point is even though the model is not
suitable, the intercept shouldn't be 5 point sth when the univariate data
is more than 100 million so I wonder whether my interpretation of those
coefficients are correct. Anyway, i have done the acf and pacf and it seems
AR(2) is the right model. Stephen

On Mon, Dec 22, 2008 at 8:33 AM, Gerard M. Keogh <GMKeogh at justice.ie>
wrote:
12 obs isn't much for an ar model to work off!
but in any event, did you check the acf of your data and did it
geometrically decay after 2 steps to 0?
If not the model is unsuitable.

Gerard

Stephen Oman
<stephen.oman at gma
il.com>                                                    To
Sent by:                  r-help at r-project.org
r-help-bounces at r-                                          cc
project.org
Subject
[R]  AR(2) coefficient
22/12/2008 15:06          interpretation

I am a beginner in using R and I need help in the interpretation of AR
result
by R.  I used 12 observations for my AR(2) model and it turned out the
intercept showed 5.23 while first and second AR coefficients showed 0.40
and
0.46. It is because my raw data are in million so it seems the intercept
is
too small and it doesn't make sense. Did i make any mistake in my code?
My
code is as follows:

attach(r)
fit<-arima(a, c(2,0,0))

Thank you for your help first.

--
View this message in context:
http://www.nabble.com/AR%282%29-coefficient-interpretation-tp21129322p21129322.html

Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

**********************************************************************************

The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you received
computer.  It is the policy of the Department of Justice, Equality and
Law Reform and the Agencies and Offices using its IT services to disallow
the sending of offensive material.
Should you consider that the material contained in this message is
offensive you should contact the sender immediately and also
mailminder[at]justice.ie.

Is le haghaidh an duine nó an eintitis ar a bhfuil sí dírithe, agus le
haghaidh an duine nó an eintitis sin amháin, a bheartaítear an fhaisnéis
a tarchuireadh agus féadfaidh sé go bhfuil ábhar faoi rún agus/nó faoi
phribhléid inti. Toirmisctear aon athbhreithniú, atarchur nó leathadh a
dhéanamh ar an bhfaisnéis seo, aon úsáid eile a bhaint aisti nó aon
ghníomh a dhéanamh ar a hiontaoibh, ag daoine nó ag eintitis seachas an
faighteoir beartaithe. Má fuair tú é seo trí dhearmad, téigh i dteagmháil
leis an seoltóir, le do thoil, agus scrios an t-ábhar as aon ríomhaire.
Is é beartas na Roinne Dlí agus Cirt, Comhionannais agus Athchóirithe
Dlí, agus na nOifígí agus na nGníomhaireachtaí a úsáideann seirbhísí TF