BookmarkSubscribeRSS Feed
mcook
Quartz | Level 8

I have a table with variables:

 

Item   N   Mean   n_A  n_B  n_C  n_D  n_0  n_1  n_2  n_3  n_4  PVal  pBis 

 

I want to get it to the form with variables:

 

Item  Stats   N   Value

 

Where Stats is broken up into 4 different rows.  N, pBis, PVal, Mean.  and Value gives the value of those stats.  

 

such as...

 

Item   Stats    Nd    Value

A1        N      100     100

A1      pBis    100      0.4

A1     PVal     100     0.28

A1      Mean   100    0.56

B1       N         150    150

B1      pBis     150    0.31

B1     PVal      150    0.46

B1     Mean    150    0.46

C1   ............

 

etc.  

2 REPLIES 2
mcook
Quartz | Level 8
I have reason to believe that a data step with 4 output statements could be used.
ballardw
Super User

I can "guess" that perhaps n_A is supposed to be an n associated with something like A but what are n_0 n_1 and so on?

 

And if there is an A1 I tend to suspect there may be an A2, A3 or such lurking somewhere.

 

You might consider providing a data step that actually gives us some values to work with.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 2 replies
  • 425 views
  • 0 likes
  • 2 in conversation