BookmarkSubscribeRSS Feed
Lapis Lazuli | Level 10


Please, I need help extracting the dates for a =>10% change in weight from baseline from a consolidated dataset for a longitudinal study for a weight loss program. There should be two variables for the dates one for the =>10% increase in weight from baseline and the other for the =>10% decrease weight as well as the associated percent change in weight. I am interested in dates for an =>10% increase in weight and if the weight ever dropped by =>10% after the weight gain., i.e. an =>10% decrease in weight after the weight gain. Some participants have multiple events of =>10% change in weight from baseline. This means they gained over 10% then lost over 10% and then gained over 10% and subsequently lost over 10%. I am attaching a made-up dataset. 

Thank you.

Super User

Many users here don't want to download Excel files because of virus potential, others have such things blocked by security software or organization policy forbids such.. Also if you give us Excel we have to create a SAS data set and due to the non-existent constraints on Excel data cells the result we end up with may not have variables of the same type (numeric or character) and even values.


Instructions here: will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the </> icon or attached as text to show exactly what you have and that we can test code against.

Lapis Lazuli | Level 10

Thank you. I will create the SAS dataset and add it to my question.



Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 2 in conversation