BookmarkSubscribeRSS Feed
PaigeMiller
Diamond | Level 26

@rtniblett15 wrote:

However, how would I be able to make this variable prior to making this esfnormal dataset. e.g. the esffinalwithestrus dataset?

I would want to create the same variable, but I would want it to be based on the estrus1b and estrus2b variables.


Again, I ask you to tell me in words how you would do this with the esffinalwithestrus data set. What is the calculation?

--
Paige Miller
rtniblett15
Calcite | Level 5

In words, it would be when the estrus1b, estrus2b, or estrus3b variables are equal to the entrydate, that observation would be day 0. Any entrydate before estrus1b would be 20, 19, 18 and so on. Any entrydate after estrus1b and before estrus2b would be 1, 2, 3, 4 and so on. Any entrydate after estrus2b and before estrus3b would be 1, 2, 3, 4 and so on. Any entrydate after estrus3b would be 1, 2, 3, 4 and so on.

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 16 replies
  • 2485 views
  • 0 likes
  • 4 in conversation