@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.
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!
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.