Hello
I have an example and I am not sure how to handle with the data
Firm | Sales | Year | Change |
A | 120 | 2007 | -8% |
A | 130 | 2006 | -7% |
A | 140 | 2005 | |
B | 15 | 2006 | 25% |
B | 12 | 2005 | 20% |
B | 10 | 2004 |
Should I use Lines A-2005 and B-2004 in column "change" as 0 or missing data?
Thanks a lot!
Either,
Change = (Sales(y) - Sales(y-1)) / Sales(y-1);
if Sales(y-1) is unknown (missing) then Change should be missing.
if Sales(y-1) is zero (new product, new company) then change should be +Infinity
I would say it would depend on what your are going to do with that change variable later. If I wanted average change rate from year to year I would not want the value to be 0 as you would end up with an n of 3 and (0 + -7 + -8)/3 would notably different from the apparent -7.5% change average. (Noting that averaging percents is a dangerous activity in general).
But for some modely I may need a 0 as a baseline.
Either,
Change = (Sales(y) - Sales(y-1)) / Sales(y-1);
if Sales(y-1) is unknown (missing) then Change should be missing.
if Sales(y-1) is zero (new product, new company) then change should be +Infinity
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!
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.