Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3. Creating a Custom Date Format Using an Existing Format Look up the SAS 9.4 documentation for the VALUE statement in PROC FORMAT. Look specifically

image text in transcribed
3. Creating a Custom Date Format Using an Existing Format Look up the SAS 9.4 documentation for the VALUE statement in PROC FORMAT. Look specifically at the syntax (and examples) that reference using existing SAS formats as labels (these are called "nested formats") Write a PROC FORMAT step to create a temporary format named DECADE that categorizes dates as identified below: January 1, 2000 - December 31, 2009 => 2000-2009 January 1, 2010 - December 31, 2017 => 2010-2017 January 1, 2018 - March 31, 2018 => 1st Quarter 2018 . April 1, 2018 and beyond => the actual date value using the MMDDYY10. format Write a PROC FREQ step to create a one-way table of the column Date from pg2.np_weather, including only rows where the column Prop is above 0.5. Format Date with the DECADE format. Show your code and a screenshot of the PROC FREQ output. . Creating a Custom Format from a Table Run the program below and review the results. Notice that some of the park types are still displayed as codes because the custom format does not include a label for those values. proc format catlin=pg2 . np_types_regions; run; proc freq data=pg2. np_summary; table Type / nocum; format Type $TypCode. ; run; Create an output table named typfmtout from the existing $TypCode format. To do this, you'll need to use the CNTLOUT= option and a SELECT statement (See a great example of these here: https://blogs.sas.com/content/sgf/2017/12/04/controlling-your-formats/ ). The typfmtout table contains several extra columns, but the critical columns for this problem are FitName, Start, and Label. Notice that the values for FmtName do not include the $ as a prefix. Open the pg2.np_newcodes table. Notice that it contains the format name, the Type values, and the labels in the FmtName, Start, and Label columns, respectively. Write a DATA step that creates a table named typfmt_update by concatenationg the typfmtout table and the pg2.np_newcodes table. Change the values of FitName to $TypCode. Keep only the FitName, Start, and Label columns Write a PROC FORMAT step that re-creates the $TypCode format using the CNTLIN= option to read the new typfmt_update table that contains the updated format values. Run the PROC FREQ step again and verify that all Type codes are displayed with labels

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Maximum Principles And Geometric Applications

Authors: Luis J AlĂ­as, Paolo Mastrolia, Marco Rigoli

1st Edition

3319243373, 9783319243375

More Books

Students also viewed these Mathematics questions

Question

Determine miller indices of plane A Z a/2 X a/2 a/2 Y

Answered: 1 week ago