Re: [R] Fitting AR(p) model

2013-05-08 Thread Pascal Oettli

Hello,

You forgot the column names. The output is:

  Length Class  Mode
order   1 -none- numeric
ar   0 -none- numeric
var.pred1 -none- numeric
x.mean  1 -none- numeric
aic13 -none- numeric
n.used  1 -none- numeric
order.max   1 -none- numeric
partialacf 12 -none- numeric
resid  17 -none- numeric
method  1 -none- character
series  1 -none- character
frequency   1 -none- numeric
call2 -none- call

So the "1" for "order" is referring to the _length_ of "order", not to 
the _value_ of "order".


Hope this helps,
Pascal


On 05/08/2013 04:49 PM, Preetam Pal wrote:

Hi all,

I am trying to fit an AR(p) model to my variable res

ar=ar(res, method="yule-walker")

The output is :

Order selected 0  sigma^2 estimated as  5.87e-06

Does this mean that the optimum value of p is 0?

But when I go for  summary(ar),

I get the following:

order   1 -none- numeric
ar   0 -none- numeric
var.pred1 -none- numeric
x.mean  1 -none- numeric
aic13 -none- numeric
n.used  1 -none- numeric
order.max   1 -none- numeric
partialacf 12 -none- numeric
resid  17 -none- numeric
method  1 -none- character
series  1 -none- character
frequency   1 -none- numeric
call2 -none- call


The confusion is : in the 1st line, order=1 is being shown, and ar is being
shown as 0 in the 2nd line.
This means that the variable res is AR with order 1 , but coefficient of
the lag variable is 0. I am confused!
In this context, how do I interpret the initial output  which said "order
selected 0".



Any help is appreciated.


Thanks,
Preetam









__
R-help@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.


[R] Fitting AR(p) model

2013-05-08 Thread Preetam Pal
Hi all,

I am trying to fit an AR(p) model to my variable res

ar=ar(res, method="yule-walker")

The output is :

Order selected 0  sigma^2 estimated as  5.87e-06

Does this mean that the optimum value of p is 0?

But when I go for  summary(ar),

I get the following:

order   1 -none- numeric
ar   0 -none- numeric
var.pred1 -none- numeric
x.mean  1 -none- numeric
aic13 -none- numeric
n.used  1 -none- numeric
order.max   1 -none- numeric
partialacf 12 -none- numeric
resid  17 -none- numeric
method  1 -none- character
series  1 -none- character
frequency   1 -none- numeric
call2 -none- call


The confusion is : in the 1st line, order=1 is being shown, and ar is being
shown as 0 in the 2nd line.
This means that the variable res is AR with order 1 , but coefficient of
the lag variable is 0. I am confused!
In this context, how do I interpret the initial output  which said "order
selected 0".



Any help is appreciated.


Thanks,
Preetam







-- 
Preetam Pal
(+91)-9432212774
M-Stat 2nd Year, Room No. N-114
Statistics Division,   C.V.Raman
Hall
Indian Statistical Institute, B.H.O.S.
Kolkata.

[[alternative HTML version deleted]]

__
R-help@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.