Hi @ballardw , thanks again for all of your help. All of the variables that start with A1Q, A2Q, RFQ, SE1Q, SE2Q, SE3Q, SE4Q, I1Q, I2Q, I3Q, I4Q are all variables that I want to process and deal with. Each set of variables differs just by the number at the end. For example, the first set of variables all end in 1. The second ends in 2, the third 3,...and so on up to 50.
Here is the context of the study I am doing. The research project that I am working on is using the Child Health Nutrition Research Initiative (CHNRI) methodology to to identify gaps in evidence for how to increase and sustain the use of child health products in the private sector, such as oral rehydration salts and zinc by prioritizing research questions proposed by experts. Experts score the proposed research questions according to a set of pre-determined criteria using a scale. We are using a 5 point Likert scale for this methodology rather than the standard "Yes (1 point), "Undecided (0.5 points)," "No (0 point)," scale. We are counting a total of 53 participants in the analysis. Each participant is scoring 50 questions, which each has 11 sub-questions (A1Q, A2Q, etc.) across 4 criteria (the criteria do not have an equal number of sub-questions; everyone is scoring 550 questions with a 5 point Likert scale, or a set of 11 questions 50 times (50 proposed questions). To calculate the agreement of scorers for any research question (across 11 sub-questions), an Average Expert Agreement is calculated, which is the number of modal responses divided by the total number of scorers summed across each sub-question divided by the number of sub-questions (11). I have attached a sample formula to this post to clarify things (titled "AEA").
You can use a custom format to collapse the 1 to 5 scale to a 3 point scale:
Proc format library=work;
value LShort
1,2 = 'Yes'
4,5 = 'No'
;
run;
And then use the Lshort format associated with the variables in proc freq. You don't say what to do with the 3.
If you are basically discarding the "3" values then recode all of the variables to 1 for yes and 0 for no with a loop like
Do I=1 to dim(a);
if a[I] in (1,2) then a[I]=1;
else if a[I] in (4,5) then a[I]=0;
else call missing(a[I]);
end;
then you can sum over a LOT of variables without having to count each one to get the number of 1 responses. Or proc freq if you want counts for each level.
And getting this far before saying only a few are the same scale is
Hi @ballardw, thanks again for all of your help. Sorry for the extremely late reply. This project hit the backburner as I worked on other projects. I plan on keeping the 3 in the analysis, though in probably all of the cases, the frequency of respondents who selected a 3 would be insignificant (especially after adding up the number of people who select 1+2 or 4+5). Can I name the Lshort format anything? Does it have to be called Lshort?
Nearly 200 sessions are now available on demand in the Innovate Hub.
Watch Now →SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.