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
Exporting data from multiple univariate regressions into one big table in excelHi all, I have used a foreach loop to do univariate logistical regression of multiple variables wit…
Exporting data from multiple univariate regressions into one big table in excelHi all, I have used a foreach loop to do univariate logistical regression of multiple variables wit…
Altering yaxis and ylabel styles for graphs that have 2 or more y axisHi Statalisters! I have a time series dataset that I have set as such with the command Code: tsset…
Standard deviation of regression residual using historical dataDear all, I'm trying to calculate the standard deviation of the regression residual where I require…
Error with multiple imputation - mi estimate does not support mixed, dfmethod() r(198);Hello, I was successfully able to impute my data, but I get the following error when I reach the mi…
Subscribe to:
Post Comments (Atom)
0 Response to create a matrix
Post a Comment