Hi
Anybody can give me some help? how to code my study?
Fdate refer to forecast announcement date, Adate refers to actual number announcement date, F_value refers to forecast value, A_value refers to actual value, and Analysts code identify specific estimator. I need to create two variables (say v1 and v2).
First, I need to find the estimator whose Fdate is the closest to Adate ( in this example, it is should be analysts #9). v1=A_value-F_value.(3.15-3.5) Then, same analysts, I need to find his/her earliest Fdate ( in this example, it is should be 20011228). v2=A_value-F_value.(3.15-3.1)
Anybody can give me some direction how to code my study?
Fdate
Adate
F_value
A_value
Analysts code
20010305
20021002
3
3.15
5
20011228
20021002
3.1
3.15
9
20020223
20021002
3.2
3.15
7
20020518
20021002
3.3
3.15
5
20020826
20021002
3.4
3.15
7
20021001
20021002
3.5
3.15
9
... View more