Nick Cox
Please,I have modified the data and it seems i wasnt able to explain what intend to do
The data below is a survey where the respondents were asked to select all that apply. So you have one responded with multiple entries. I have to tabulate the frequencies and percentages. But i need to first label the responses as follows: 1-- Context, 2--plan information, 3-- External Procedures, 4-- Internal Procedures, 5-- Storage and Maintenance, 6-- Data Transfer and 7-- Goals. NA is supposed to be excluded from the tabulation and the percentages are computed by dividing the frequency for each response by the total number of observations (45 observations ie 47 minus the 2 missing values). In this this the total frequency would be more than 100%. The final table should look like the table below --
Is there a way to do the tabulation without reshaping the data? need help please.
----------------------- copy starting from the next line -----------------------
------------------ copy up to and including the previous line ------------------
Please,I have modified the data and it seems i wasnt able to explain what intend to do
The data below is a survey where the respondents were asked to select all that apply. So you have one responded with multiple entries. I have to tabulate the frequencies and percentages. But i need to first label the responses as follows: 1-- Context, 2--plan information, 3-- External Procedures, 4-- Internal Procedures, 5-- Storage and Maintenance, 6-- Data Transfer and 7-- Goals. NA is supposed to be excluded from the tabulation and the percentages are computed by dividing the frequency for each response by the total number of observations (45 observations ie 47 minus the 2 missing values). In this this the total frequency would be more than 100%. The final table should look like the table below --
| Freq | Percentage | |
| Context | 27 | 60.00 |
| Plan information | 31 | 68.89 |
| External Procedures | 35 | 77.78 |
| Internal Procedures | 30 | 66.67 |
| Storage and Maintenance | 30 | 66.67 |
| Data Transfer | 39 | 86.67 |
| Goal | 11 | 24.44 |
Is there a way to do the tabulation without reshaping the data? need help please.
----------------------- copy starting from the next line -----------------------
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str13 _2 "4,6" "1,2,3,6" "NA" "2,3,4,5,6,7" "1,2,3,4,5,6" "1,2,3,4,5,6" "6" "1,2,3,4,5,6" "3,6" "NA" "3,6" "1,2,3,4,5,6" "1,2,3,4,5" "2,3,4,5,6,7" "2,3,4,5,6" "1,2,3,4,5,6,7" "1,2,3,5,6" "2,4,6" "1,2,3,4,5,6" "1,2,3,4,5,6" "1,3,4,6" "2,3,6" "1,3" "1,2,3,4,5,6" "1,2,3,4,5,6" "1,2,3,4,5,6" "1,2,3,4,5,6,7" "3,6" "7" "6" "5,6" "1,2,3,4,5,6" "6,7" "1,2,3,5,7" "1,2,3,4,5,7" "4,5,6" "6" "1,2,3,4,5,6,7" "1,2,4" "1,2,3,4,5,6" "1,2,3,4,5,6" "1,2,3,4,5,6" "2,3,4,5,6,7" "1,2,3,4,5,6" "3,5,6" "1,2,3,4,5,6" "1,2,3,4,5,6,7" end

Comment