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
Using -cmp- to estimate and interpret a three-stage Heckman modelGood morning all, I am using the -cmp- package developed by Roodman to estimate a three-stage Heckm…
Foreach vs. Forvalues when using char() function to remove special characters in a string variableHello all, Using Stata 15.1/IC I need to submit a bulk file with a string variable ("NAME" variabl…
margins not estimableHi all, I run a panel data fixed effect regression. There is an interaction term in the model. Thro…
grouped variablesHi I currently have a variables for income following this structure: Therefore when I run summary s…
Hyperlink to the file generated/modified by putexcelThis is a very minor request/question. Several of the user-made commands I use (e.g. estout, and ieb…
Subscribe to:
Post Comments (Atom)
0 Response to Error while declaring panel data
Post a Comment