BookmarkSubscribeRSS Feed
JackZ295
Pyrite | Level 9

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"). 

 

A paper I read collapsed the Likert Scale choices for "No, strongly disagree," and "No, somewhat disagree," and the Likert choices for "Yes, somewhat agree" and "Yes, strongly agree" to form the choices for "No" and "Yes". In this case, I would have to add the frequencies of the choices marked "4" and "5" and the frequencies of the choices marked "1" and "2" to represent "Yes" and "No" and then determine the mode and frequency of the mode after in order to calculate the AEA. I realize that proc freq makes this difficult, as choices that have a frequency of 0 would not show on proc freq. 
 
Only the A1Q, A2Q, etc. variables are Likert variables. I am going to use the frequency of the mode to calculate the AEA (formula attached). Basically, I want to output the mode and frequency of the mode after combining the Likert choices (4+5, 1+2). I would merge these output data sets into one and use that to do AEA calculations if that makes sense. Let me know if anything about what I am doing is confusing. Thanks again!  AEA.PNG
ballardw
Super User

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

 

 

JackZ295
Pyrite | Level 9

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? 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Mastering the WHERE Clause in PROC SQL

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.

Discussion stats
  • 17 replies
  • 1443 views
  • 3 likes
  • 4 in conversation