Dear Statalisters,
I am new to stata. I have an unbalanced dataset on firms' investment and number of their patents. The issue here is one firm can have multiple investments in same year in different countries. So, I got an error while declaring panel data. I can't combine investment amount per year because I'd like to see the impact based on the countries economy (developed and non-developed). I need to set the time variable "yearly" because I will use lag efffect. I couldn't find the solution. Does anyone have idea on this kind of issue?
My data set looks like this:
* Example generated by -dataex-. To install: ssc install dataex
clear
input float(id year) int patcount str14 Destination double Investment int Jobscreated str1 div
1 2010 18 "Japan" 2000000 7 "E"
1 2014 16 "Vietnam" 82400000 1281 "E"
2 2010 40 "India" 8500000 284 "I"
2 2013 51 "Indonesia" 5700000 72 "I"
2 2013 51 "Singapore" 8600000 26 "G"
2 2014 6 "Canada" 6600000 36 "I"
2 2014 6 "United States" 21100000 125 "I"
2 2014 6 "United States" 21100000 125 "I"
3 2012 5 "Singapore" 22100000 20 "I"
3 2012 5 "Brazil" 1600000 20 "I"
3 2013 5 "United States" 17700000 58 "I"
3 2014 52 "United States" 3.000e+08 200 "I"
3 2014 52 "Brazil" 15400000 77 "I"
4 2014 3 "United Kingdom" 3000000 18 "I"
5 2015 59 "India" 20000000 500 "I"
6 2014 1334 "Germany" 56000 10 "E"
6 2016 10 "India" 4200000 13 "E"
7 2010 2 "Russia" 54100000 137 "E"
7 2010 107 "Russia" 54100000 137 "E"
7 2013 126 "United States" 58400000 128 "E"
end
Related Posts with Error while declaring panel data
QQ Plot DifficultiesHello , I need to compare two series of data (with sufficiently large number of observations) in ran…
weights with cmclogitHi All, I am running choice models in STATA 16 MP with the new "cmclogit" command and ran into a fe…
How many levels possible with -mixed-?Dear all, I have googled quite a bit and looked into the Stata manual, but couldn't really find an …
Predicted values after running a Tobit model with an endogenous variableHi all, I want to estimate a Tobit model with a binary endogenous regressor. As suggested elsewhere…
New verrsions of xdir and descsave on SSCThanks as always to Kit Baum, new versions of the xdir and descsave packages are now available for d…
Subscribe to:
Post Comments (Atom)
0 Response to Error while declaring panel data
Post a Comment