Programming the statistical procedures from SAS

if/then statement

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 5
Accepted Solution

if/then statement

Hi,

Sorry if this is a basic question for the forum, but I would appreaciate help.

I used a PROC expand step to create a lag in my data set and the data that was previously 0 is now very small scinetific numbers. Can I add an if/then statement within the PROC expand step that if the vaiable is < 0 that it =0? Or is that a seperate data step?

Thank you!


Accepted Solutions
Solution
‎03-27-2012 12:56 PM
Respected Advisor
Posts: 3,147

if/then statement

I could be blatantly wrong. I think a separated step (data step, sql) would be needed in your case.

Haikuo

View solution in original post


All Replies
Solution
‎03-27-2012 12:56 PM
Respected Advisor
Posts: 3,147

if/then statement

I could be blatantly wrong. I think a separated step (data step, sql) would be needed in your case.

Haikuo

Occasional Contributor
Posts: 5

if/then statement

Thank you! I did a seperate data step.

Respected Advisor
Posts: 4,756

if/then statement

Consider using the FUZZ function in a separate datastep.

PG

PG
🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 340 views
  • 3 likes
  • 3 in conversation