@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?
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 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.