Hi all,
This might be a trivial question but whatever I have tried seems not working. (e.g. looping through the values of the variable fdi using forvalues and trying to generate new variables)
I have 2000+ territorial units (variable id) and the number of foreign firms located in each territory (variable fdi). My aim is to create a matrix similar to the one below. Namely, for each id, I want to create a new variable which is equal to the number of foreign firms in that territorial unit. Put differently, a matrix 2000 by 2000 is what I need
Will you please give me some hints regarding which commands I should look at/begin with?
Many thanks!
Array
Related Posts with create a matrix
Ordered Probit PostestimationDear all Stata users, I have been trying to do postestimation for a ordered probit model for each o…
How to specifiy dummy variables/ exporting multiregression to word document?Array So I'm running a multiregression on the effect that age plays on duration of unemployment. …
Present 3 regression models in a single tableI have done three regressions in STATA. All variables are same, but in the 'country_name' variable (…
Interpreting the r and adjusted r square value in an arima modelHello, i have been working on some time series data for the last couple of days which has required t…
How to drop year observations from a variableI am using V-dem version 6. In the year variable, observations begin from 1789. I want to use 'drop'…
Subscribe to:
Post Comments (Atom)
0 Response to create a matrix
Post a Comment