I'd like to try some of the examples in "simulation models for business planning and economic forecasting" ( https://support.sas.com/rnd/app/ets/papers/simulationmodels.pdf ). Does anybody know where to find the sales-toaster-data?
Hi @user24feb, I contacted the author of the paper and was told it's fake data. But he did provide the code. Hope it helps.
Thanks,
Shelley
data toast;
tsales =870;
fs_sales =470;
fs_price =10;
gnp = 0.5;
price = 10.1;
do t=1 to 50;
month = t;
price = price * 0.8 + 1.5 * rannor(52) + 1.5;
fs_price = 0.7 * fs_price + 15.1 + 5 * rannor(5);
bprice = 0.1 + 0.01 * rannor(2);
gnp = 0.8 * gnp + 0.7 *rannor(156) + 1;
nwed = 4 * sin(t/5) + 25 + 3*rannor(644);
tsales = 0.91 *tsales - 18.5 * price ** 1.2 +
13 *nwed + 10 * gnp + 30;
fs_sales = 0.9 * fs_sales - fs_price ** 0.5 +
18 * gnp + 50 ;
if t >= 15 and t < 20 then tsales = tsales + 250;
if t >= 35 and t < 40 then tsales = tsales + 290;
if t >= 15 and t < 20 then fs_sales = fs_sales + 150;
if t >= 35 and t < 40 then fs_sales = fs_sales + 190;
ad_cost =0;
if t >= 15 and t < 20 then ad_cost = 5000;
if t >= 35 and t < 40 then ad_cost = 8000;
tsales = (tsales - 0.01 * fs_sales) /0.9995;
fs_sales = fs_sales - 0.015 * tsales;
tsales = tsales + 20*rannor(7);
fs_sales = fs_sales + 8*rannor(66);
output;
end;
run;
title height=4 'Monthly Toaster Sales';
proc gplot data=toast;
axis1 value=(height=3) label=(height=3 'Months');
axis2 value=(height=3) label=(height=3 'TSales');
plot tsales*month / haxis=axis1 vaxis=axis2;
symbol1 width=2 i=join ;
run;
Hi @user24feb, I contacted the author of the paper and was told it's fake data. But he did provide the code. Hope it helps.
Thanks,
Shelley
data toast;
tsales =870;
fs_sales =470;
fs_price =10;
gnp = 0.5;
price = 10.1;
do t=1 to 50;
month = t;
price = price * 0.8 + 1.5 * rannor(52) + 1.5;
fs_price = 0.7 * fs_price + 15.1 + 5 * rannor(5);
bprice = 0.1 + 0.01 * rannor(2);
gnp = 0.8 * gnp + 0.7 *rannor(156) + 1;
nwed = 4 * sin(t/5) + 25 + 3*rannor(644);
tsales = 0.91 *tsales - 18.5 * price ** 1.2 +
13 *nwed + 10 * gnp + 30;
fs_sales = 0.9 * fs_sales - fs_price ** 0.5 +
18 * gnp + 50 ;
if t >= 15 and t < 20 then tsales = tsales + 250;
if t >= 35 and t < 40 then tsales = tsales + 290;
if t >= 15 and t < 20 then fs_sales = fs_sales + 150;
if t >= 35 and t < 40 then fs_sales = fs_sales + 190;
ad_cost =0;
if t >= 15 and t < 20 then ad_cost = 5000;
if t >= 35 and t < 40 then ad_cost = 8000;
tsales = (tsales - 0.01 * fs_sales) /0.9995;
fs_sales = fs_sales - 0.015 * tsales;
tsales = tsales + 20*rannor(7);
fs_sales = fs_sales + 8*rannor(66);
output;
end;
run;
title height=4 'Monthly Toaster Sales';
proc gplot data=toast;
axis1 value=(height=3) label=(height=3 'Months');
axis2 value=(height=3) label=(height=3 'TSales');
plot tsales*month / haxis=axis1 vaxis=axis2;
symbol1 width=2 i=join ;
run;
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.
Find more tutorials on the SAS Users YouTube channel.