Multiple choice technology programming languages

Data asthma; input city Asthma count; datalines; 1 1 35 1 0 65 2 1 40 2 0 60 3 1 25 3 0 75 ; run; proc format; value asth 0= 'No Asthma' 1= 'Asthma' ; run; Which of the following code produce the output : Asthma Frequency Percent ---------------------------------- Asthma 100 33.33 No Asthma 200 66.67

  1. proc freq data=asthma ; weight count; tables asthma / nocum; format asthma asth.; run;

  2. proc freq data=asthma order = formatted ; weight count; tables asthma / nocum; format asthma asth.; run;

  3. proc freq data=asthma order = formatted ; weight count; tables asthma ; format asthma asth.; run;

  4. proc freq data=asthma order = formatted ; tables asthma / nocum; format asthma asth.; run;

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

To produce the output with 'Asthma' (value 1) appearing before 'No Asthma' (value 0), you need ORDER=FORMATTED to sort by the formatted values alphabetically. The WEIGHT COUNT statement is essential because the dataset has multiple rows per observation with a count variable. The NOCUM option suppresses cumulative statistics. Without ORDER=FORMATTED, the default internal ordering would show No Asthma (0) before Asthma (1).