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
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.