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
Specifying IV with panel data, binary treatment and binary/count outcomeDear all Statalisters I am working on an application of an instrumental variable (IV) approach to a…
why the bias corredted confidence interval is missing?Hi all, why the confidence interval after bootstraping is missing? Code: * Example generated by -…
Twoway graph X axisHi all, Would anyone know whether there is a similar over () function such as with the graph bar (a…
Identifying the newly employed receptionist and the waitresses who joined the enterprise after the new receptionist assumed officeHi, I have the follwoing sample: Code: ssc install dataex clear input int year str6 staff_id str5 h…
Creating Lagged variables with repeated valuesDear all, I wanted help in creating lagged variables when there are repeated values in the dataset.…
Subscribe to:
Post Comments (Atom)
0 Response to Gravity Model: reverse causality LEAD variable
Post a Comment