s-news
[Top] [All Lists]

injecting date column into time series ?

To: s-news@lists.biostat.wustl.edu
Subject: injecting date column into time series ?
From: "Squid Splus" <squid.splus@gmail.com>
Date: Sat, 20 May 2006 18:08:07 -0500
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=rskZb3zsIlcgp1Di8HXhncln74N9CUeNeicmW6zxvnBuFeBv3WbbsxINaLIHNjW488sd5pf7Rro45YYPPDzQRtP7VcYmMe8HI7pzMfleGxu4WLFaLRyd/+DkzhTm2c/FZjSGgedP1JpepN4QsiMfoU3r7Emc1KSeRmCib1US/qg=
I'm starting out with a small SAS data set and wanting to do some time series
analysis with Finmetrics but I'm not sure I have loaded and indexed the
data in the correctly for time series methods to work on it.


module(finmetrics);
mydata   <- importData("C:\\data\\mydata.sas7bdat", type="sas7");
ts    <- timeSeq(from="1/1/2002",to="3/1/2006", by = "months", + format = "%b %Y");


1. Warning message
sequence is over-specified -- ignoring length in: timeSeq(from =
    "1/1/2002", to = "3/1/2006", by = "months",  + format = "%b %Y" ....

mydata2 <- cbind(mydata,ts);
mytdatats <- timeSeries(mydata2);

mydatats     prints out   // date was a character variable in the SAS data set.


       date          x1        ..2
 1 d2002Jan 0.016330678 01/01/2002
 2 d2002Feb 0.011731270 02/01/2002
 3 d2002Mar 0.008660340 03/01/2002
 
 
2. How do I address the column '..2' ?  As mydatats$..2  ?


3. I want to run time series methods from Zivots book, eg    
 
 kpss <- stationaryTest(mydatats$x1,trend="c");

Error Oject mydatats not found.

Do I need to attach to it if mydatats just found and printed it ?

Thanks for any suggestions.





<Prev in Thread] Current Thread [Next in Thread>
  • injecting date column into time series ?, Squid Splus <=