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, can you please help me Thank you in advance ____________________________________________________ Avec le traducteur Voila, lisez enfin les journaux ?trangers ! http://tr.voila.fr/ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: AF.txt URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20081112/82ff5712/attachment.txt>
is this what you expect?> ur.df(PIBTUN$V1,type='none',lags=1)############################################################### # Augmented Dickey-Fuller Test Unit Root / Cointegration Test # ############################################################### The value of the test statistic is: 6.2523 On Wed, Nov 12, 2008 at 8:56 AM, <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, can you please help me > Thank you in advance > > ____________________________________________________ > > Avec le traducteur Voila, lisez enfin les journaux ?trangers ! http://tr.voila.fr/ > > ______________________________________________ > 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. > >
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/ >