DATA Step, Macro, Functions and more

How to retain new variables based on old ones

Reply
Occasional Contributor MCB
Occasional Contributor
Posts: 15

How to retain new variables based on old ones

I have a dataset with dates and prices which I need to complete with lagded variables.

 

The attached file "have" shows how some observations in my data look like. Then Attached file "want" shows what I would like to do with the variables EDT and Price.

 

Thanks!

 

Super User
Posts: 7,845

Re: How to retain new variables based on old ones

Post example data in a data step.

I won't touch Excel files from the internet (even if the firewall let them through).

This is a SAS community, not a MS Office forum.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Occasional Contributor MCB
Occasional Contributor
Posts: 15

Re: How to retain new variables based on old ones

Posted in reply to KurtBremser

Thank you. I have a solution.

Ask a Question
Discussion stats
  • 2 replies
  • 117 views
  • 0 likes
  • 2 in conversation