BookmarkSubscribeRSS Feed
deleted_user
Not applicable
data tran
input acc date $ emi dpd;
cards;
101 nov08 90 0
101 dec08 80 1
101 jan09 45 0
102 nov08 89 0
102 dec08 89 1
102 jan09 78 2
run;


Hi i am having a dataset i wnat to transpose this but i wnat to transpose two variable .i wnat the output like this


acc nov08 dec08 jan09 nov_emi dec_emi jan_emi
101 90 80 45 0 1 0
102 89 89 78 0 1 2


i have done by transposing emi and then i have taken another datset and again traspose the dpd then i have merged it.

But i wnat this in Transpose
1 REPLY 1
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Appears you have multiple, unique PREFIX= requirements for your transposed variables, therefore you must consider two PROC TRANSPOSE executions with a DATA step to MERGE the outputs together creating the columns you have listed.

Below is a link to one of several technical/conference papers found on the SAS support http://support.sas.com/ website to consider.

Scott Barry
SBBWorks, Inc.

Changing the Shape of Your Data: PROC TRANSPOSE vs. Arrays
Bob Virgile, Robert Virgile Associates, Inc.
http://www2.sas.com/proceedings/sugi24/Begtutor/p60-24.pdf

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