Reputation: 8127
Is it possible to tell Stata to ignore Saturdays and Sundays when using time series operators such as L
and F
?
For example, consider this dataset:
date price L1.price / L2.price (currently) L1.price / L2.price (wanted!)
tue 5 . / . . / .
wed . 5 / . 5 / .
thu 7 . / 5 . / 5
fri 3 7 / . 7 / .
sat [ignore this row]
sun [ignore this row]
mon 1 . / . 3 / 7
tue 9 1 / . 1 / 3
The third column illustrates Stata's current behavior.
I want it to behave like in the last column.
Is this possible?
Upvotes: 0
Views: 1323
Reputation: 9460
Stata has support for business calendars. Take a look in the manual entry for datetime business calendars. They walk you through how you an make one by omitting weekends and holidays.
Upvotes: 4