I have a dataset which represents the volume of sales over three years:
data test;
input one two three average;
datalines;
10 20 30 .
20 30 40 .
10 30 50 .
10 10 10 .
;
run;
I'm looking for a way to find the middle point of the three years, the average sale point
the updated dataset would read
data test;
input one two three average;
datalines;
10 20 30 2
20 30 40 1.5
10 30 50 2.1
10 10 10 1.5
;
run;
So essentially looking for what part of the three years the halfway point of the sales occurred.
Appreciate.
EDIT: what I've been trying with the weight and proc means
I've been trying to use proc means and weight function but it doesn't give me the average point of the three years
proc means data=test noprint;
var one two three;
var one+two+three=total;
var (one+two+three)/3=Average;
var Average/weight=Average_Year;
output out=testa2
sum(Total) =
mean(Total) = ;
run;