Hi,
I am trying to import an adjacency matrix (2927x2927) in Stata which I created in R based on a shp file. However, when I arrive to the step:
"spmat import SPWMat using Sus_2017_FINAL_2.csv, replace normalize(row)"
I get an error message:
"Error in line 1 of file Sus_2017_FINAL_2.csv"
My csv file has no "alphanumeric" elements. In the first row, there is only a number in the top left cell stating the total number of observations. In the first column, there are codes for my observations starting from the second row.
My problem seems to be very similar with the problems here:
https://www.researchgate.net/post/Import_distance_time_matrices_in_Stata
and here:
http://www.statalist.org/forums/forum/general-stata-discussion/general/295364-spmat-import-txt-files
However, in neither forum a clear solution was provided.
Basically, I would like to export this csv file in Stata to a spmat file so that I could apply spatial analysis using this matrix. Can you please help me with this? I will appreciate your help a lot.
Michal
P.S. I attached my csv file to this message