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

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

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