Hi I have a dataset of industrial clusters which are segmented into districts, states and products (as shown in table.1 below). I want to reshape the data by states to show which prod has how many clusters in that particular state (as shown in table.2 below). I have assigned numbers to the observations where clusters are unique for each observation and the rest have repeated occurrences. I tried
reshape wide clus dist, i(st)
j(prod) but I am getting
variable prod is string; specify string option
error. Please help me.


Table.1
Cluster clus District dist State st Product prod
Nellore Aerated Water 100001 Nellore 1 Andhra Pradesh a Aerated Water 1001
Hindupur Agarbatti 100002 Anantapur 2 Andhra Pradesh a Agarbatti 1002
Prakasam Agarbatti 100003 Prakasam 3 Andhra Pradesh a Agarbatti 1002
Kakopothar Incense Stick Making 100004 Tinsukia 4 Assam b Agarbatti 1002
Gaya Agarbatti 100005 Gaya 5 Bihar c Agarbatti 1002
Jahanabad Agarbatti 100006 Jahanabad 6 Bihar c Agarbatti 1002
Shikaripura Agri Seeds 100027 Shimoga 25 Karnataka e Agri Seeds 1003
Raigarh Agricultural Implements 100028 Raigarh 26 Chhattisgarh l Agricultural Implements 1004
Hubli Agricultural Implements 100067 Dharwad 59 Karnataka e Agricultural Implements 1005
Sirmour Agro Processing 100068 Sirmour 60 Himachal Pradesh r Agro Processing 1006
Kishtwar Agro Processing 100069 Kishtwar 61 Jammu & Kashmir s Agro Processing 1006
Atapur Utencils 100070 Keonjhar 62 Odisha t Aluminium Utensils 1007
Pratapgarh Amla 100071 Pratapgarh 63 Uttar Pradesh j Amla 1008
Vijayawada Auto Components 100072 Krishna 64 Andhra Pradesh a Auto Components 1009
Mayapuri Auto Components 100073 West Delhi 65 Delhi u Auto Components 1009

Table.2
State Aerated Water Agarbatti Agri Seeds Agricultural Implements Agro Processing Aluminium Utensils Amla Auto Components
Andhra Pradesh 1 2 1
Assam 1
Bihar 2
Karnataka 1 1
Chhattisgarh 1
Himachal Pradesh 1
Jammu & Kashmir 1
Odisha 1
Uttar Pradesh 1
Delhi 1