Page 1 of 1

Time Varying constant

Posted: Fri Sep 17, 2021 10:32 pm
by kpr
Hi!

I wonder how to generate a time-varying constant series such as

y=1, if 1999M1--2009M1
y=2, if 2009M2--2013M3
y=3, if 2013M4--2018M1
......

Thanks

Re: Time Varying constant

Posted: Sat Sep 18, 2021 6:48 am
by startz
kpr wrote:I wonder how to generate a time-varying constant series such as

y=1, if 1999M1--2009M1
y=2, if 2009M2--2013M3
y=3, if 2013M4--2018M1


Code: Select all

smpl 1999M1 2009M1
series y = 1
smpl 2009M2 2013M3
y = 2
smpl 2013M4 2018M1
y = 3
smpl @all

Re: Time Varying constant

Posted: Mon Dec 13, 2021 12:40 am
by kpr
So it seems not possible to avoid using SMPL so many times. Thanks for the reply.