Hello Statalist,

As a beginner, I am asking a silly and simple question. In my panel data model. there are volatilities in the exchange rate. For example, we want to see when the exchange rate appreciated in 2013, what impact was in 2014 or 2015. Whenever there is a shock, what the effect continues until 2 periods. So, I want to add that specific time period in my regression to see the effects after its current period. Also, the exchange rate graph is attached for your information.

How can I add the specific time in my regression?

Thanks for your reply

Example generated by -dataex-. To install: ssc install dataex
clear
input float(id qdate) double(employment ex_rate)
1 200 107.50307099540791 98.25576490087526
1 201 101.47601095104292 100.52078926423046
1 202 108.11807712238392 101.8434312282335
1 203 82.9028259163672 99.38001057027785
1 204 128.2902780871973 92.32040908741166
1 205 119.31118863334744 90.23724799410688
1 206 103.8130342335518 82.57419111516431
1 207 125.21524745231721 85.60800112009628
1 208 137.6383712172328 89.52632793845525
1 209 126.32225848087405 91.02256666023368
1 210 120.29519843650907 90.71670570605798
1 211 134.19433690616708 91.89055044911068
1 212 127.42926950943087 93.30412404813892
1 213 130.25829769352057 89.36099769295487
1 214 115.74415309688654 85.03761177311996
1 215 128.2902780871973 83.5661725881666
1 216 127.67527196022128 80.54062909550966
1 217 130.62730136970617 86.48425142124829
1 218 125.58425112850281 85.64933368147136
1 219 130.62730136970617 87.50929894335063
1 220 127.06026583324527 86.5834495685485
1 221 125.95325480468844 81.99553525591298
1 222 119.55719108413786 76.01058036879927
1 223 119.31118863334744 81.97073571908793
1 224 109.71709305252158 84.83094896624449
1 225 115.62115187149134 84.21922705789308
1 226 106.02705629066547 83.92989912826742
1 227 102.82902443039016 77.35802186962735
1 228 132.34931852523903 75.11779704309723
1 229 134.07133568077188 76.78763252265105
1 230 127.67527196022128 75.77911802509874
1 231 117.46617025241939 71.36480047023862
2 200 98.55670103092784 98.25576490087526
2 201 92.92096219931271 100.52078926423046
2 202 103.6426116838488 101.8434312282335
2 203 104.87972508591065 99.38001057027785
2 204 101.44329896907216 92.32040908741166
2 205 112.16494845360825 90.23724799410688
2 206 106.25429553264604 82.57419111516431
2 207 112.85223367697594 85.60800112009628
2 208 113.53951890034364 89.52632793845525
2 209 119.3127147766323 91.02256666023368
2 210 123.98625429553265 90.71670570605798
2 211 123.43642611683849 91.89055044911068
2 212 128.24742268041237 93.30412404813892
2 213 130.17182130584192 89.36099769295487
2 214 126.04810996563575 85.03761177311996
2 215 120.96219931271477 83.5661725881666
2 216 135.80756013745705 80.54062909550966
2 217 127.97250859106528 86.48425142124829
2 218 132.78350515463916 85.64933368147136
2 219 136.63230240549828 87.50929894335063
2 220 132.78350515463916 86.5834495685485
2 221 140.75601374570448 81.99553525591298
2 222 137.31958762886597 76.01058036879927
2 223 138.8316151202749 81.97073571908793
2 224 134.9828178694158 84.83094896624449
2 225 140.89347079037802 84.21922705789308
2 226 137.7319587628866 83.92989912826742
2 227 138.55670103092783 77.35802186962735
2 228 135.80756013745705 75.11779704309723
2 229 143.78006872852234 76.78763252265105
2 230 139.93127147766322 75.77911802509874
2 231 145.29209621993127 71.36480047023862
3 200 99.66777224909754 98.25576490087526
3 201 101.4799135627175 100.52078926423046
3 202 105.2250056108654 101.8434312282335
3 203 93.6273012036977 99.38001057027785
3 204 106.31229039903738 92.32040908741166
3 205 106.31229039903738 90.23724799410688
3 206 101.60072298362549 82.57419111516431
3 207 113.5608556535172 85.60800112009628
3 208 110.66142955172526 89.52632793845525
3 209 104.13772082269344 91.02256666023368
3 210 116.70190059712512 90.71670570605798
3 211 111.02385781444927 91.89055044911068
3 212 111.62790491898926 93.30412404813892
3 213 126.60827311158087 89.36099769295487
3 214 120.68861148708903 85.03761177311996
3 215 116.33947233440112 83.5661725881666
3 216 122.74237164252497 80.54062909550966
3 217 116.58109117621713 86.48425142124829
3 218 114.16490275805718 85.64933368147136
3 219 114.52733102078118 87.50929894335063
3 220 127.21232021612086 86.5834495685485
3 221 114.28571217896517 81.99553525591298
3 222 121.77589627526099 76.01058036879927
3 223 119.96375496164104 81.97073571908793
3 224 125.40017890250091 84.83094896624449
3 225 122.500752800709 84.21922705789308
3 226 119.84294554073306 83.92989912826742
3 227 130.83660284336077 77.35802186962735
3 228 135.54817025877267 75.11779704309723
3 229 127.93717674156885 76.78763252265105
3 230 128.29960500429283 75.77911802509874
3 231 121.77589627526099 71.36480047023862
4 200 145.22507859421418 98.25576490087526
4 201 87.2247961429135 100.52078926423046
4 202 84.0274885029482 101.8434312282335
4 203 83.52265045453262 99.38001057027785


Array