Barite | Level 11

## data set for "simulation models .." by Erdman

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Manager

## Re: data set for "simulation models .." by Erdman

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;

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;
``````
It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
2 REPLIES 2
Community Manager

## Re: data set for "simulation models .." by Erdman

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;

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;
``````
It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
Barite | Level 11

## Re: data set for "simulation models .." by Erdman

If somebody else is ever interested: Add `date = intnx('month', '01JAN89'd, t); format date Date9.;`.
Discussion stats
• 2 replies
• 767 views
• 4 likes
• 2 in conversation