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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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