BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
yael
Quartz | Level 8

Hello

 

I have an example and I am not sure how to handle with the data

 

FirmSalesYearChange
A1202007-8%
A1302006-7%
A1402005 
B15200625%
B12200520%
B102004 

 

Should I use Lines A-2005 and B-2004 in column "change" as 0 or missing data?

 

Thanks a lot!

1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

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

PG

View solution in original post

2 REPLIES 2
ballardw
Super User

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.

PGStats
Opal | Level 21

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

PG

sas-innovate-2024.png

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.

 

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
  • 1914 views
  • 0 likes
  • 3 in conversation