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:
r<-read.table("data.txt", dec=",", header=T)
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.
As I need your urgent help so let me modify my question. I imported the
following data set to R and run the statements i mentioned in my previous
reply
Year Month Period a b c
1 2008 Jan 2008-Jan 105,536,785 9,322,074 9,212,111
2 2008 Feb 2008-Feb 137,239,037 10,986,047 11,718,202
3 2008 Mar 2008-Mar 130,237,985 10,653,977 11,296,096
4 2008 Apr 2008-Apr 133,634,288 10,582,305 11,729,520
5 2008 May 2008-May 161,312,530 13,486,695 13,966,435
6 2008 Jun 2008-Jun 153,091,141 12,635,693 13,360,372
7 2008 Jul 2008-Jul 176,063,906 13,882,619 15,202,934
8 2008 Aug 2008-Aug 193,584,660 14,756,116 16,083,263
9 2008 Sep 2008-Sep 180,894,120 13,874,154 14,524,268
10 2008 Oct 2008-Oct 196,691,055 14,998,119 15,802,627
11 2008 Nov 2008-Nov 184,977,893 13,748,124 14,328,875
and the AR result is
Call:
arima(x = a, order = c(2, 0, 0))
Coefficients:
ar1 ar2 intercept
0.4683 0.4020 5.8654
s.e. 0.2889 0.3132 2.8366
sigma^2 estimated as 4.115: log likelihood = -24.04, aic = 56.08
The minimum mount of a is more than 100 million and the intercept is 5.86
based on the result above.
If I placed all values into the formula then Xt=5.8654+0.4683*(184,977,893
)+0.4020*(196,691,055 )= 165,694,957.27. Do you think that makes sense? Did
i interpret the result incorrectly?
Also, i submit the following statement for the prediction of next period
> predict<-predict(fit, n.ahead=1)
> predict
it came out the value of 9.397515 below and I have no idea about how to
interpret this value. Please help.
$pred
Time Series:
Start = 12
End = 12
Frequency = 1
[1] 9.397515
$se
Time Series:
Start = 12
End = 12
Frequency = 1
[1] 2.028483
Stephen Oman wrote:>
> 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:
>
> r<-read.table("data.txt", dec=",", header=T)
> 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-tp21129322p21138255.html
Sent from the R help mailing list archive at Nabble.com.
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:
r<-read.table("data.txt", dec=",", header=T)
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
PLEASE do read the posting guide
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
this in error, please contact the sender and delete the material from any
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
na Roinne, seoladh ?bhair chol?il a dh?chead?.
M?s rud ? go measann t? gur ?bhar col?il at? san ?bhar at? sa
teachtaireacht seo is ceart duit dul i dteagmh?il leis an seolt?ir
l?ithreach agus le mailminder[ag]justice.ie chomh maith.
***********************************************************************************