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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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