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
generate event time across yearsDear All, Consider the following data (a duplicate post is here): Code: * Example generated by -dat…
Merging more than two data sets using macros and foreach loopHello Everyone, I want to merge three datasets using macros and foreach loop. The file names are 1.…
Problem in adding p-values of null hypothesis while creating a tableGreetings! As per the model on which I am working where I try to find the impact of mentoring versus…
Questions in doing semHi there! I want to conduct an SEM model to test the mediator. However, it shows 'factor-variable op…
Free 2-day seminar on Stata's sem and gsem commandsHi everyone, over the holidays Instats is offering some free 2-day seminars on Path Modeling includi…
Subscribe to:
Post Comments (Atom)
0 Response to Synthetic Controls - String Variables
Post a Comment