Hello everyone,
I am trying to create a table which in includes the frequency of college majors in a campus program . Each person can select multiple majors, so there are dummy variables for each. I only want to display the number and percentage.
This code produces the exact look I would like. The label name and values are on the same row. However the values are not what I need.

Instead, I would like these values (frequency, and the percentage of sample of chose the major) in this picture.

I used the index to calculate the percent and only show the "yes (1)" responses. However I would like everything to be on the same row and eliminate the "1".
I am not sure what I am missing.Thank you for any help!
I am trying to create a table which in includes the frequency of college majors in a campus program . Each person can select multiple majors, so there are dummy variables for each. I only want to display the number and percentage.
This code produces the exact look I would like. The label name and values are on the same row. However the values are not what I need.
Code:
dtable m_fin m_gen m_his m_und
Instead, I would like these values (frequency, and the percentage of sample of chose the major) in this picture.
I used the index to calculate the percent and only show the "yes (1)" responses. However I would like everything to be on the same row and eliminate the "1".
Code:
dtable i1.m_fin i1.m_gen i1.m_his i1.m_und
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float(m_fin m_gen m_his m_und) 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 end label var m_fin "Finance" label var m_gen "Genetics" label var m_his "History" label m_und "Undecided"
Comment