BookmarkSubscribeRSS Feed
msreddy
Calcite | Level 5

hi can you help me how to derive locf bocf wocf below is the data i need dynamic code.

1 REPLY 1
mkeintz
PROC Star

Please show, in the form of a working sas data step, the data from your sample,  and then, also in the form of a sas data step, what you expect the result to look like.   Help us help you.

 

I presume LOCF is last-obs-carried forward.   What are BOCF and WOCF?  "best" and "worst" obs carried forward?   If so, what is your definition of best and worst?  Also, is the AVAL variable the only one to be processed for LOCF, BOCF, and WOCF?  It's the only one with a missing value, so it's the only one for which LOCF would have an impact.

 

 

--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 1 reply
  • 1858 views
  • 0 likes
  • 2 in conversation