Thanks so much all !! I think I misunderstood the question. I think the question is asking the total number of observations where the variable Type is Sedan. Not the number of observations where the variable type is sedan that With Average MPG Over 40. To be more detail, i will provide the question and the code from answer key below. Here is the question: Open the ehs02 program from the EHS folder and correct the errors in the program below. Example Code 2 ehs02 Program: Fix the Errors work.mycars; set sashelp.cars; AvgMPG=mean(mpg_city, mpg_highway); run; title 'Cars With Average MPG Over 40'; proc print data=work.mycars var make model type avgmpg; where AvgMPG>40; run; title 'Average MPG by Car Type'; proc means data=work.mycars avg min max maxdec=1; var avgmpg; class type; run; title; Test Your Code: 1. What is the number of observations where the variable Type is Sedan? 2. How many observations are printed to the report titled, “Cars With Average MPG Over 40”? Objectives Accomplished: • Identify the characteristics of SAS statements. • Define SAS syntax rules and identify common syntax errors such as misspelled keywords, unmatched quotation marks, missing semicolons, and invalid options. • Use the log to help diagnose syntax errors in a given program. --------------------------------------------------------------------------------------------- below is the code from the answer keys: data work.mycars; set sashelp.cars; AvgMPG=mean(mpg_city, mpg_highway); run; title "Cars with Average MPG Over 40"; proc print data=work.mycars; var make model type avgmpg; where AvgMPG>40; run; title "Average MPG by Car Type"; proc means data=work.mycars mean min max maxdec=1; var avgmpg; class type; run; title;
... View more