Dear STATALIST,
I am writing you for probably a simple issue. I wish to generate 3rd variables (
d3 and
bp3) from two 2-item measurement scales each (Scale 1: variables
d1 and
d2/ Scale 2:
bp1 and
bp2), and a 4
th variable (
i4) from a 3-item scale (
i1,
i2 and
i3). The scales are 5-point Likert-scales. There are thus 5 response options. I thus wish for the new generated variables to give me the summary (frequencies) for each answer categories. This would essentially give me a single summary frequency for each response category for each scale, as opposed to having two to three summary frequencies per scale (one for each scale item). For instance, if for Scale 1 I have 10% of respondents who rated the scale item with the response category one (very true) and another 10% who chose the same answer for the second scale item (d2), I wish for the new variable generated (d3) to be the summary frequency of the response category ‘very true’ for that scale (10%). Within each scale, the total number of respondents is the same for each item. I am not sure how to proceed and if this is feasible. A sample of the dataset is below.
Thank you very much
Code:
* Example generated by -dataex-. To install: ssc install dataexclearinput byte(d1 d2 bp1 bp2 i1 i2 i3)3 1 4 2 4 4 44 4 2 2 4 4 42 2 2 2 2 2 22 4 2 2 4 4 44 4 4 4 4 4 42 2 4 4 4 2 14 4 4 2 1 2 22 2 2 2 4 2 22 2 2 2 4 4 44 4 4 4 2 5 42 2 2 2 4 2 24 4 4 4 4 4 45 4 2 2 4 2 34 4 4 4 4 4 42 4 2 2 4 4 4endlabel values d1 d1label values d2 d1label values i1 d1label values i2 d1label values i3 d1label values bp1 d1label values bp2 d1label def d1 2 "True", modifylabel def d1 3 "Neither untrue nor true", modifylabel def d1 4 "Untrue", modifylabel def d1 5 "Very untrue", modifylabel def d1 1 "Very true", modify
Comment