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
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.