BookmarkSubscribeRSS Feed
Iamcassandra
Calcite | Level 5

*Using the SAS data set SASHELP.Cars, compute the mean and standard deviation for Horsepower
broken down by Make and Origin. Include the number of nonmissing and missing values in the output and print all statistics to one decimal place. Use the PRINTALLTYPES option to see all possible combinations of the CLASS variables

5 REPLIES 5
Quentin
Super User

Please show the code you have tried, the log from running the code, and describe what is going wrong (errors? wrong result?)  

 

That will make it easier for people to help you.

PaigeMiller
Diamond | Level 26

Please also provide a meaningful subject that describes the problem, please change the subject in your ORIGINAL post. ALmost every post here could have the subject "I can't figure it out" and so this is not a meaningful subject line.

--
Paige Miller
ballardw
Super User

Since this sounds a lot like homework what procedures were recently covered in your class/ training?

I can see this done in summary procedures like Proc Means/Summary/Univariate and reporting procedures Report or Tabulate.

Which I would use might depend on other requirements or common appearance with other output.

 

The option Printalltypes seems to indicate the instructor expects you to use Proc Means, and the "all possible combinations of Class variables" implies the presence of a CLASS statement (grouping variables).

 

Style comment: "number of missing or nonmissing" should be integers. Decimal places with integer counts are pretty strange in general  though it is easy to force such.

Cynthia_sas
Diamond | Level 26
Hi, in addition to the excellent suggestions you've already received, whoever wrote this assignment provided you with a hint. If you use this search string in Google:
site: support.sas.com PRINTALLTYPES
You should see in the results that the PRINTALLTYPES option is an option that can be used in the PROC MEANS statement and the links in Google should take you to the PROC MEANS documentation, where you will also see information about the CLASS statement. The documentation for PROC MEANS has 13 examples of how to use the procedure. If your teacher has not provided you with any other information, taking a look at the PROC MEANS examples would be a good place to start.
Cynthia

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1620 views
  • 1 like
  • 6 in conversation