BookmarkSubscribeRSS Feed
joeyyyyyg
Calcite | Level 5

I have a small project constructing code to obtain data illustrated below: Are constructing Crosstabs the best method to illustrate these frequencies? Or using Proc Print? I'm relatively new to SAS and feel this project may be trivial to advanced users - Please no trolls - all input is welcome. Thank you SAS community.

 

All counts and %s will be done by Facility and Facility/Program Type

- Count submissions with the same DOB, name, sex

- Count of Unknowns for assigned sex at birth

- Count and % of submissions age > 90 or < 2.

- Count and % of submissions with length of first name=2 or length of last name=2.

- Count and % of submissions with first name=(unknown, un, unk, qq, zz, or format of alpha, “.”) or last name=(unknown, un, unk, qq, zz, or format of alpha, “.”) [Note: check other non-alpha characters allowed by the application.]

-Count and % of submissions of questions with Unknown as a possible response by FUS (or Facility)

-Count and % of submissions with unknown month or day of birth.

- Count and % of submissions from children’s programs with age > 21. See list below. I may have listed a few that don’t have to do the PCS.

1 REPLY 1
Astounding
PROC Star

Given your "newness", some of the responses you get may skip over questions that you really need to investigate.

 

PROC FREQ will answer most of these questions.  Some will require a combination of PROC FORMAT and PROC FREQ which is easy for advanced users, but might require some study on your part.

 

Where do you begin?  I would suggest looking at your data.

 

Do you already have a SAS data set? 

 

Does each "submission" represent a single observation in the SAS data set?

 

I would imagine that the answers are "yes" so far.

 

Do you know the names of the variables in the SAS data set?  (If you haven't done so already, run PROC CONTENTS on the data set.)

 

After that, explore the data.  You will need to know, for example, whether "unknown" is represented by a blank value, or by "unk" or by "UNK" (or by some other value).  A simple PROC FREQ (on GENDER) would tell you that. 

 

You will need to know how the birth date values are stored ... as one numeric variable, as one character variable, as three variables ...

 

What is the definition of "non-alpha"?

 

What is the definition of a "children's program"?

 

All of this takes place before you begin to answer any of the questions that you originally posed.

 

Good luck.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 632 views
  • 0 likes
  • 2 in conversation