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
Drop Observations which are contained more than once in Panel DataDear Stata Community, I have the following dataset: Household_ID Personal_ID Round 1 1 1 1 2 1 1 2…
Any stata code for calculating adjusted number needed to be exposed (NNE)?Hello, I was wondering is there any Stata code available for calculating adjusted number needed to …
Quarterly population data into monthly dataDear Statalist experts, I have the following data set, I have been trying to transform this quarterl…
Percentage increase in estimated probabilities for binary treatment and binary outcomesI have a binary outcome variable and a binary treatment variable. Using margins, it's easy enough to…
FGLS test to solve only Heteroskedasticity problem in Fixed Effect ModelHello, My dependent variable is NPLs (Non-performing Loans) and 6 independent variables - M3 = Money…
Subscribe to:
Post Comments (Atom)
0 Response to Gravity Model: reverse causality LEAD variable
Post a Comment