[R] Demean argument in ar function

2013-03-14 Thread soham chakraborty
Hello,
 I understand that the/ demean/ argument in the *ar()* function to fit an
autoregressive model selects the best AR model fitted to the mean deleted
observations.
What is the purpose of using this demean procedure at all?
Its seems silly as the post doesn't deal with R problems
Thanks



--
View this message in context: 
http://r.789695.n4.nabble.com/Demean-argument-in-ar-function-tp4661304.html
Sent from the R help mailing list archive at Nabble.com.

__
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.


Re: [R] comparing two vectors

2012-12-02 Thread soham chakraborty
Berend,
  I am working with a time series data.The log-likelihood is to be maximized
for a set of parameters.
Lets say that x1 and x2 are the output from two successive iterations.I am
trying to find out,
*if(all(abs(x1-x2).0001,say))*




--
View this message in context: 
http://r.789695.n4.nabble.com/comparing-two-vectors-tp4651282p4651760.html
Sent from the R help mailing list archive at Nabble.com.

__
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] comparing two vectors

2012-11-29 Thread soham chakraborty
Hello,
I am performing Newton Raphson iteration where the parameter vector which I
want to optimize is an *nx1* vector.
I am running a while loop which will continue unless a stopping condition is
satisfied
Now, the stopping condition will have to be such that the parameter vector
after two successive iterations are very close to each other,*component
wise*.
I have tried the* all* function, in which case the number of iterations are
enormous.
Is there any better way to do this?

Thanking all in advance,
Soham Chakraborty



--
View this message in context: 
http://r.789695.n4.nabble.com/comparing-two-vectors-tp4651282.html
Sent from the R help mailing list archive at Nabble.com.

__
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] order.max specification problem in the ar.ols function

2012-11-27 Thread soham chakraborty
Hello
I am facing a curious problem.I have a time series data with which i want to
fit auto-regressive  model of order p, where p runs from 1:9.I am using a
for loop which will fit an AR(p) model for each value of p using the
*ar.ols* function.
I am using the following code
for ( p in 1:9){
a=ar.ols (x=data.ts, order.max=p, demean=T, intercept=T)
}
Specifying the *order.max* to be p, it gives me a fitted AR model of order
exactly p, though it may not be the best model.
The code works fine except for p=4,5, in which cases it fits an AR (3) model
to the data.
I don't seem to understand what is the problem.Also is there any alternative
way by which i can fit an AR(p) model where p is specified by the user?
Any help in this matter will be of immense help.
Thank you.
Soham Chakraborty



--
View this message in context: 
http://r.789695.n4.nabble.com/order-max-specification-problem-in-the-ar-ols-function-tp4650942.html
Sent from the R help mailing list archive at Nabble.com.

__
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.


Re: [R] order.max specification problem in the ar.ols function

2012-11-27 Thread soham chakraborty
Thank you very much for the advice.It works that way.
Soham Chakraborty



--
View this message in context: 
http://r.789695.n4.nabble.com/order-max-specification-problem-in-the-ar-ols-function-tp4650942p4650957.html
Sent from the R help mailing list archive at Nabble.com.

__
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] AR vs ARMA model

2012-08-03 Thread Soham
Hi I am trying to fit a time series data.It gives a AR(2) model using the ar
function and ARMA(1,1) model using autoarmafit function in timsac
package.How do I know which is the correct underlying model? pls help 



--
View this message in context: 
http://r.789695.n4.nabble.com/AR-vs-ARMA-model-tp4639015.html
Sent from the R help mailing list archive at Nabble.com.

__
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] bilinear time series model

2012-07-25 Thread Soham
Hello,
 I am interested in fitting a bilinear time series model in R after
determining its order for a given data.
Is there any command or function that I can use?




--
View this message in context: 
http://r.789695.n4.nabble.com/bilinear-time-series-model-tp4637760.html
Sent from the R help mailing list archive at Nabble.com.

__
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] p value

2010-05-16 Thread Soham

How to compute the p-value of a statistic generally?
-- 
View this message in context: 
http://r.789695.n4.nabble.com/p-value-tp2217867p2217867.html
Sent from the R help mailing list archive at Nabble.com.

__
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.