I am trying to run the npsynth command (Abadie, Diamond, Hainmueller, 2009) with a database of gravity data. Each observation is a trade flow from a pair of countries (pairs). The group of control variables is composed uniquely by dummy and nummeric variables. There is no string variable on the control group.
When I try to execute the command npsynth the following message pops up:
"factor-variable and time-series operators not allowed"
Command:
global controles "contig comlang_off comlang_ethno comcol col45 distw pop_o ///
gdpcap_o gdpcap_d tdiff heg_d conflict indepdate heg_o colony curcol gatt_o ///
gatt_d rta gsp gsp_rec"
npsynth tradeflow $controles t_0(1996) bandw(0.4) panel_var(tradeflow) time_var(year) trunit(ARBO) kern(biweight)
The syntax is taken from https://www.stata.com/meeting/uk17/s...17_Cerulli.pdf
__________________________________________________ __________________________________________________ __________________________________________________ ___
I have already tried to maintain only dummy variables (such as colony) or only nummeric continuous variables (such as gdpcap_o) but the same message keeps coming up.
My data is organized such as follows:
Array
At a first glance I had the impression the problem resides on the variable pairs, since it is composed by nonnummeric values. Changing it to numbers did not help.
Does someone has any idea why this keep happening ?
Thanks in advance!
Related Posts with Synthetic Controls - String Variables
Enter all data from a dta file into a predefined Gantt diagram in StataHello everyone I really don't think the export excel command doesn't work very well when you have a…
Eliminating reverse pair in trade dataDear Users, Greetings of the day! I am working on a gravity model and need help in data preparation…
Number of clusters in fracregI am working with data at the firm-year level where I am running a regression with standard errors c…
Cannot connect to SQL Database TableHello, I'm attempting to import data from a table in SQL Server into Stata. I've setup the connecti…
Threshold Regression in STATA 17Hi, I want to run the following regression: threshold inv, threshvar(lagtotaldebtofgdp) regionvars…
Subscribe to:
Post Comments (Atom)
0 Response to Synthetic Controls - String Variables
Post a Comment