[R] problem with urca package
Achim Zeileis
Achim.Zeileis at wu-wien.ac.at
Wed Nov 12 02:19:09 CET 2008
On Wed, 12 Nov 2008, hassen62 at voila.fr wrote:
> Dear R users,
> I have the joined txt file in the following direct directory C://
> I have written the following lines:
> library(urca);
> PIBTUN<-read.table("C:/AF.txt", header=F);
> ur.df(PIBTUN,type='none',lags=1)
> but I have obtained the following message:
> Error in embed(z, lags) : 'x' is not a vector or matrix
> I don't What's the problem,
The problem is that you haven't read the help page. The first argument of
ur.df() should be a vector but you supply a data.frame. As your data just
contains a single column, you probably want
PIBTUN <- PIBTUN[,1]
which stores the data as a vector. After that the ur.df() call above
should work.
Z
> can you please help me
> Thank you in advance
>
> ____________________________________________________
>
> Avec le traducteur Voila, lisez enfin les journaux étrangers ! http://tr.voila.fr/
>
More information about the R-help
mailing list