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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 2239 views
  • 6 likes
  • 3 in conversation