Dear all,
I want to conduct a panel data analysis using a very large dataset with close to 2b observations. I am using Stata 16 for Windows.
My time variable is in string format and and the data looks as follows:
Here, I attempted to use time as a time variable using the following command:
gen time2 =quarter(time, "YQ")
format time2 %tq
However, I always receive the error message:
time, "YQ" invalid name
r(198),
I am not sure where this error comes from as this solution had been successfully implemented in similar previous posts. Hence, I would kindly like to ask you how to circumvent this problem.
Thank you very much for your advice in advance!
Best regards,
I want to conduct a panel data analysis using a very large dataset with close to 2b observations. I am using Stata 16 for Windows.
My time variable is in string format and and the data looks as follows:
ID | time | price |
AB123 | 2010Q1 | 10 |
AB123 | 2010Q2 | 11 |
BG235 | 2011Q2 | 500 |
BG235 | 2011Q3 | 550 |
QWE89 | 2016Q4 | 1000 |
Here, I attempted to use time as a time variable using the following command:
gen time2 =quarter(time, "YQ")
format time2 %tq
However, I always receive the error message:
time, "YQ" invalid name
r(198),
I am not sure where this error comes from as this solution had been successfully implemented in similar previous posts. Hence, I would kindly like to ask you how to circumvent this problem.
Thank you very much for your advice in advance!
Best regards,
Comment