[R] Questions about regression with time-series

2006-12-06 Thread Lulla OPATOWSKI
Hi,

I am using 2 times series and I want to carry out a regression of Seri1 
by Serie2 using structured (autocorrelated) errors.
(Equivalent to the autoreg function in SAS)

I found the function gls (package nlme) and I made:

gls_mens-gls(mening_s_des~dataATB, correlation = corAR1())

My problem is that I don’t want a AR(1) structure but ARMA(n,p) but the 
execution fails :

gls_mens-gls(mening_s_des~dataATB, correlation = corARMA(p=52))
Error in coef-.corARMA(`*tmp*`, value = c(11.2591629857661, 
9.1821585359071,  :
Coefficient matrix not invertible

This should be because most of the coefficients 52 are near to 0.

I am looking for a way to be able :
- To evaluate automatically my ARMA structure (if it exists)
- To specify manually the not null lags for my ARMA structure (as a 
vector for example)

Does anyone know about such functions?

Thank you for your help


[[alternative text/enriched version deleted]]

__
R-help@stat.math.ethz.ch 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] Questions about regression with time-series

2006-12-06 Thread Giovanni Petris

I think the function 'arima' can handle this, except for
the automatic evaluation of the ARMA orders.

Giovanni

 Date: Wed, 06 Dec 2006 12:06:46 +0100
 From: Lulla OPATOWSKI [EMAIL PROTECTED]
 Sender: [EMAIL PROTECTED]
 Precedence: list
 
 --===0156932283==
 Content-Disposition: inline
 Content-Type: text/plain
 Content-Transfer-Encoding: quoted-printable
 Content-length: 954
 
 Hi,
 
 I am using 2 times series and I want to carry out a regression of Seri1=20
 by Serie2 using structured (autocorrelated) errors.
 (Equivalent to the autoreg function in SAS)
 
 I found the function gls (package nlme) and I made:
 
 gls_mens-gls(mening_s_des~dataATB, correlation =3D corAR1())
 
 My problem is that I don=92t want a AR(1) structure but ARMA(n,p) but the=
 =20
 execution fails :
 
 gls_mens-gls(mening_s_des~dataATB, correlation =3D corARMA(p=3D52))
 Error in coef-.corARMA(`*tmp*`, value =3D c(11.2591629857661,=20
 9.1821585359071,  :
   Coefficient matrix not invertible
 
 This should be because most of the coefficients 52 are near to 0.
 
 I am looking for a way to be able :
 - To evaluate automatically my ARMA structure (if it exists)
 - To specify manually the not null lags for my ARMA structure (as a=20
 vector for example)
 
 Does anyone know about such functions?
 
 Thank you for your help
 
 
   [[alternative text/enriched version deleted]]
 
 
 --===0156932283==
 Content-Type: text/plain; charset=us-ascii
 MIME-Version: 1.0
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline
 
 __
 R-help@stat.math.ethz.ch 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.
 
 --===0156932283==--
 


__
R-help@stat.math.ethz.ch 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.