I encountered a problem when I tried to run a program( I wrote this code because I want to cut a whole time series into several samples according to the date, for example, the data from 2001/1/1-2001/1/31 is a sample, the data from 2001/2/1-2001/2/28 is another sample, and then do regressions within each sample).
Code: Select all
wfopen C:\Users\dell\Desktop\agriculture.xlsx
for !i= 1 to 12
for !j=2001 to 2019
smpl {!j}m{!i} {!j}m{!i}
genr a{!j}{!i} =ri
genr b{!j}{!i} =roil
genr c{!j}{!i} =rm
genr d{!j}{!i} =smb
genr e{!j}{!i} =hml
matrix(5,(!i-1)*19+!j-2000) coefs
equation eq{!j}{!i}.ls a{!j}{!i} c b{!j}{!i} c{!j}{!i} d{!j}{!i} e{!j}{!i}
colplace(coefs, eq{!j}{!i}.@coefs,(!i-1)*19+!j-2000)
next
next
When I run this code, Eviews gave me the notice: Error in Sample: Illegal date 1/1/2001 in "SMPL 2001M1 2001M1".
I wonder what goes wrong .
If I can get your help, I will be very happy. Thank you in advance!