Dear Matt,

yes you have. 'plm' doesn't support multi-column time indices, but it should 
happily make do with any *single* time index whose order can be recognized by 
R, such as, e.g., a lexicographic ordering. 
So you will probably want to paste your indices along these lines:

> year <- rep(2000:2001,times=c(4,4))
> year
[1] 2000 2000 2000 2000 2001 2001 2001 2001
> 
> quarter <- rep(1:4,times=2)
> quarter
[1] 1 2 3 4 1 2 3 4
> 
> myind <- paste(year, quarter, sep="q")
> myind
[1] "2000q1" "2000q2" "2000q3" "2000q4" "2001q1" "2001q2" "2001q3" "2001q4"
> 
> order(myind)
[1] 1 2 3 4 5 6 7 8

(of course you must be careful with the double digits in case of months and so 
on).

As all 'plm' uses is "standard" R ordering, please refer to the general 
documentation of the R system for any issues.

Best wishes,
Giovanni

------------- original message -----------------

Message: 182
Date: Wed, 3 Feb 2010 10:37:13 +0100
From: "Bunny, lautloscrew.com" <bu...@lautloscrew.com>
To: r-help@r-project.org
Subject: [R] plm package index
Message-ID: <9b6a22f4-5dd0-4fcd-9a6f-aee1e2108...@lautloscrew.com>
Content-Type: text/plain

Dear all, 

i just wonder  if there´s a way to use a two column time index field in plm 
package. 

the manual says the following concerning data indexing: 

a character vector of length two containing the names of the individual and the 
time
index,

What would y´all do with a quarterly dataset that contains one column for the 
period and one for the year. Do I have to convert it to one single date field 
first ?


thx in advance

matt
        [[alternative HTML version deleted]]

------------- end original message ---------------

Giovanni Millo
Research Dept.,
Assicurazioni Generali SpA
Via Machiavelli 4, 
34132 Trieste (Italy)
tel. +39 040 671184 
fax  +39 040 671160 

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

Reply via email to