BookmarkSubscribeRSS Feed
BigZ
Calcite | Level 5

HI All,

I am trying to do some Regression analysis and the table that I am using as my input has some data gaps.

Thesis what I mean by it. I used "Spit Column" function in the EG in order to create a Cross tab Table from a flat table. However as is the case in some cases there is some missing data here and there.

So my question is how do I make empty points (.) become 0 so that I can do my regression analysis.

For general reference I have showed how data looks after transposing the input table.

CompanyProduct 1

Product 2

Product 3Product 4
1$5.$200$70
2..$23.
3$40$70.$100
4$23.$44$1

P.S. There are about 70 Products so i tough about writing a new query and doing computations on each of the new columns but that just seems crazy.

Thanks for any help you can offer.

5 REPLIES 5
ballardw
Super User

What kind of analysis were you planning?

It may be that your data structure would work better as: Company ProductDescription Value. Then you wouldn't have any "gaps".

BigZ
Calcite | Level 5

well I need to see what Products have the highest impact on Product1.

TomKari
Onyx | Level 15

Give this a try:

proc stdize data=have out=want reponly MISSING=0;

var Product1-Product4;

run;

Tom

BigZ
Calcite | Level 5

Hi TomKari, the image bellow is the process I have in my EG Project. Where would you recommend i place your code?

TomKari
Onyx | Level 15

Put it in as a code node (File | New | Program), link the output dataset from your "Split Columns" to it, and replace the dataset name "have" with the name of the dataset created by your split columns.

Tom

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 5 replies
  • 1066 views
  • 6 likes
  • 3 in conversation