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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

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