BookmarkSubscribeRSS Feed
4301
Calcite | Level 5
rescale time variable from days to years;
years=LENFOL/365.25;
run;

it showed an error after running this command, is there any mistake in the command?

1 REPLY 1
PGStats
Opal | Level 21

The first code line of code is not valid SAS syntax. If you intend it as a comment, it should start with an asterisk (*). Moreover, the code should be part of a data step, i.e. it should start with a data statement. You must also tell SAS where to get the value for LENFOL, likely with a set statement.

 

data myNewDataset;

set myOldDataset;

* Rescale time variable from days to years;

years = lenfol / 365.25;

run;

PG

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 631 views
  • 0 likes
  • 2 in conversation