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
How to rename all the variables?Hi, I want to rename all the variables by adding _year to all of them at the end (eg. religion_2005…
Is there any way of using psacalc within a loop?I am running a fixed effects model using the -areg- command. Using Emily Oster's -psacalc-, I am loo…
combined visual presentation of logistic regression resultsI am conducting logistic regressions with a dichotomous outcome (iatrogenic) and a single, continuou…
How to Perform a Poolability Test in StataDear Users, I wish to perform a Chow's Poolability test using Stata as part of my preliminary analy…
Store p-values in a matrix after 'actest'Dear Statalist users, I am using the 'actest' command to conduct a serial correlation test after ti…
Subscribe to:
Post Comments (Atom)
0 Response to Synthetic Controls - String Variables
Post a Comment