Hi,
I am trying to test for potential reverse causality between RTAs using a gravity model.
RTA = 1 if exporter and importer have a RTA at year t.
The pairid is the distance between exporter and importer.
I would like to generate a lead variable capturing the future level of RTAs (in the next 4 years):
tsset pairid year
gen RTA_LEAD4 = f4.RTA
replace RTA_LEAD4 = 0 if RTA_LEAD4 == .
However, I received this error:
tsset pairid year
repeated time values within panel
I think this is because in my database trade flows are treated separately each way (exports and imports) so each pairid of countries is two times each year.
How could I generate the RTA_LEAD4 without changing my pairid?
Thanks!!
Related Posts with Gravity Model: reverse causality LEAD variable
CIBAR (sort ascending)Wonder if possibel to apply sort ascending or sort descening funciton to cibar generated graph. for …
Impact of unmeasured confounders. episensi and average treatment effects mhboundsDear Experts, multiple sensetivity analysis are now available. First, I was going over episensi deve…
Same value for duplicatesHello, statalist! I am struggling with the replace the value for the same person. In the dataset, t…
-putexcel- command not exporting results to excel fileI have written codes to export regression model results to excel file, and the codes are: Code: ve…
How to include age as a dummy control in a fixed effect regression?Dear all, I have a problem understanding how i should specify the contol variable age in the follow…
Subscribe to:
Post Comments (Atom)
0 Response to Gravity Model: reverse causality LEAD variable
Post a Comment