BookmarkSubscribeRSS Feed
Norman21
Lapis Lazuli | Level 10
Hi,

I'm trying to produce a brief but comprehensive report on tables extracted from a database with SAS, for delivery to a third party for statistical analysis. The table below produced with PROC CONTENTS is just the sort of thing I'm aiming for, but there are two columns I'd like to add - N and NMISS for every variable (character, numeric or date).

Can anyone help with this? I'm running 9.2 on Windows XP.

Thanks in advance,

Norman.

Here is a sample of a table - sorry about the formatting; the columns align in my document!

TT01 Form

The CONTENTS Procedure

Variables in Creation Order
# Variable Type Len Format Informat Label
1 TSTAMP Num 8 DATE9. DATE9. TSTAMP
2 TT Char 50 $50. $50. TT
3 PTIDENT Char 50 $50. $50. PTIDENT
4 PTTRIALID Char 50 $50. $50. PTTRIALID
5 UK Num 8 11. 11. UK
6 INCRIT1 Num 8 11. 11. INCRIT1
7 INCRIT2 Num 8 11. 11. INCRIT2
8 INCRIT3 Num 8 11. 11. INCRIT3
9 INCRIT4 Num 8 11. 11. INCRIT4
10 INCRIT5 Num 8 11. 11. INCRIT5
11 EXCRIT1 Num 8 11. 11. EXCRIT1
12 EXCRIT2 Num 8 11. 11. EXCRIT2
13 EXCRIT3 Num 8 11. 11. EXCRIT3
14 EXCRIT4 Num 8 11. 11. EXCRIT4
15 EXCRIT5 Num 8 11. 11. EXCRIT5
16 PSNAME1 Char 50 $50. $50. PSNAME1
17 PFNAME1 Char 50 $50. $50. PFNAME1
18 HOSPNO1 Char 50 $50. $50. HOSPNO1
19 DOB1 Num 8 DATE9. DATE9. DOB1
20 DPTINFO Num 8 DATE9. DATE9. DPTINFO
...etc.
Norman.
SAS 9.4 (TS1M6) X64_10PRO WIN 10.0.17763 Workstation

1 REPLY 1
Doc_Duke
Rhodochrosite | Level 12
SAS doesn't do that in one procedure. You are going to have to splice together the information from multiple procedures. You can use the ODS datasets to output the data and then merge it back together. You may actually find the Enterprise Guide "Characterize data" task gives you the additional information that you need; the statisticians will appreciate the additional distribution information from that task.

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 561 views
  • 0 likes
  • 2 in conversation