Hi all,

I have a panel data of the following form:

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input str11 ID float period strL INDUSTRY
"10000111_1"  1 "Not Applicable"                                                         
"10000111_10" 1 "Not Applicable"                                                         
"10000111_11" 1 "Not Applicable"                                                         
"10000111_12" 1 "Not Applicable"                                                         
"10000111_13" 1 "Not Applicable"                                                         
"10000111_14" 1 "Not Applicable"                                                         
"10000111_15" 1 "Not Applicable"                                                         
"10000111_16" 1 "Not Applicable"                                                         
"10000111_2"  1 "Retail Trade"                                                           
"10000111_3"  1 "Not Applicable"                                                         
"10000111_4"  1 "Not Applicable"                                                         
"10000111_5"  1 "Not Applicable"                                                         
"10000111_6"  1 "Not Applicable"                                                         
"10000111_7"  1 "Not Applicable"                                                         
"10000111_8"  1 "Not Applicable"                                                         
"10000111_9"  1 "Not Applicable"                                                         
"10001060_1"  0 "Crop Cultivation"                                                       
"10001060_1"  1 "Crop Cultivation"                                                       
"10001060_1"  1 "Crop Cultivation"                                                       
"10001060_2"  0 "Crop Cultivation"                                                       
"10001060_2"  1 "Crop Cultivation"                                                       
"10001060_2"  1 "Crop Cultivation"                                                       
"10001060_3"  0 "Not Applicable"                                                         
"10001060_3"  1 "Not Applicable"                                                         
"10001060_3"  1 "Not Applicable"                                                         
"10001060_4"  0 "Not Applicable"                                                         
"10001060_4"  1 "Not Applicable"                                                         
"10001060_4"  1 "Not Applicable"                                                         
"10001079_1"  0 "Cement, Tiles, Bricks, Ceramics, Glass and other construction materials"
"10001079_1"  0 "Crop Cultivation"                                                       
"10001079_1"  1 "Crop Cultivation"                                                       
"10001079_1"  1 "Crop Cultivation"                                                       
"10001079_2"  0 "Not Applicable"                                                         
"10001079_2"  0 "Not Applicable"                                                         
"10001079_2"  1 "Not Applicable"                                                         
"10001079_2"  1 "Not Applicable"                                                         
"10001079_3"  0 "Not Applicable"                                                         
"10001079_3"  0 "Not Applicable"                                                         
"10001079_3"  1 "Not Applicable"                                                         
"10001079_3"  1 "Not Applicable"                                                         
"10001079_4"  0 "Not Applicable"                                                         
"10001079_4"  0 "Not Applicable"                                                         
"10001079_4"  1 "Not Applicable"                                                         
"10001079_4"  1 "Not Applicable"                                                         
"10001079_5"  0 "Not Applicable"                                                         
"10001079_5"  0 "Not Applicable"                                                         
"10001079_5"  1 "Not Applicable"                                                         
"10001079_5"  1 "Not Applicable"                                                         
"10002083_1"  0 "Not Applicable"                                                         
"10002083_1"  1 "Not Applicable"                                                         
"10002083_1"  1 "Retail Trade"                                                           
"10002083_2"  0 "Not Applicable"                                                         
"10002083_2"  1 "Not Applicable"                                                         
"10002083_2"  1 "Not Applicable"                                                         
"10002083_3"  0 "Not Applicable"                                                         
"10002083_3"  1 "Not Applicable"                                                         
"10002083_3"  1 "Not Applicable"                                                         
"10002083_4"  0 "Not Applicable"                                                         
"10002083_4"  1 "Not Applicable"                                                         
"10002083_4"  1 "Not Applicable"                                                         
"10002083_5"  0 "Not Applicable"                                                         
"10002083_5"  1 "Not Applicable"                                                         
"10002083_5"  1 "Not Applicable"                                                         
"10002181_1"  0 "Not Applicable"                                                         
"10002181_1"  0 "Not Applicable"                                                         
"10002181_1"  1 "Not Applicable"                                                         
"10002181_1"  1 "Not Applicable"                                                         
"10002181_2"  0 "Repair, Maintenance and Operations (RMO)"                               
"10002181_2"  0 "Personal Non-Professional Services"                                     
"10002181_2"  1 "Travel and Tourism"                                                     
"10002181_2"  1 "Travel and Tourism"                                                     
"10002181_3"  0 "Not Applicable"                                                         
"10002181_3"  0 "Not Applicable"                                                         
"10002181_3"  1 "Not Applicable"                                                         
"10002181_3"  1 "Personal Non-Professional Services"                                     
"10002477_1"  0 "Not Applicable"                                                         
"10002477_1"  0 "Not Applicable"                                                         
"10002477_1"  1 "Not Applicable"                                                         
"10002477_1"  1 "Not Applicable"                                                         
"10002477_10" 1 "Not Applicable"                                                         
"10002477_10" 1 "Not Applicable"                                                         
"10002477_2"  0 "Not Applicable"                                                         
"10002477_2"  0 "Not Applicable"                                                         
"10002477_2"  1 "Food Industries"                                                        
"10002477_2"  1 "Not Applicable"                                                         
"10002477_3"  0 "Travel and Tourism"                                                     
"10002477_3"  0 "Cement, Tiles, Bricks, Ceramics, Glass and other construction materials"
"10002477_3"  1 "Travel and Tourism"                                                     
"10002477_3"  1 "Automobiles and Other Transport Equipment Manufacturers"                
"10002477_4"  0 "Not Applicable"                                                         
"10002477_4"  0 "Not Applicable"                                                         
"10002477_4"  1 "Fruits and Vegetable Farming"                                           
"10002477_4"  1 "Food Industries"                                                        
"10002477_5"  0 "Not Applicable"                                                         
"10002477_5"  0 "Not Applicable"                                                         
"10002477_5"  1 "Not Applicable"                                                         
"10002477_5"  1 "Not Applicable"                                                         
"10002477_6"  0 "Not Applicable"                                                         
"10002477_6"  0 "Not Applicable"                                                         
"10002477_6"  1 "Not Applicable"                                                         
end
Period 0 is the period before a policy change was implemented, Period 1 is the period after policy implementation.
To get a summary of the variable INDUSTRY, I did
Code:
tab INDUSTRY if period==0
and
Code:
tab INDUSTRY  if period==1
By looking at the summary, it would be apparent that the percentages under each of the industry categories have undergone changes. Some have gone up and some have gone down. The policy intervention in question is expected to have adverse impact on employment so a fall in the percentages is our focus of study. Now I want to see if the percentages are significantly different. In a way I'm thinking of something like chi sq test for comparison of frequency such that I can see if "freq_category`i'_period 0" is significantly different from "freq_category`i'_period 1". But my understanding is that the Chi sq test can be applied if pre and post samples are independent? Which led me to think that I'd need a different test for panel data.

I would be extremely grateful if someone could guide me towards an appropriate test in this case.

Regards,