18.10.2014 Views

SIMSCRIPT II.5 Programming Language

SIMSCRIPT II.5 Programming Language

SIMSCRIPT II.5 Programming Language

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Modelling Concepts<br />

compute D = sum of LOCAL.GNP.PERCAPITA *<br />

LOCAL.SALES.PERCAPITA<br />

loop<br />

let SALES.GNP.RC = (N.COUNTY*D - A*C) / (N.COUNTY*B - A**2)<br />

loop<br />

for every YEAR,<br />

do<br />

for every CAR<br />

do<br />

compute A = sum, B = ssq of PRICE<br />

compute C = sum of SALES.GNP.RC<br />

compute D = sum of PRICE*SALES.GNP.RC<br />

loop<br />

let RC.PRICE.RC= (N.CAR*D - A*C)/(N.CAR*B - A**2)<br />

loop<br />

list SALES.GNP.RC, RC.PRICE.RC and NATIONAL.GNP<br />

stop<br />

end<br />

_______________________________________________________________________________<br />

This program reads data on auto sales and prices for different population units, and computes regression<br />

coefficients that allow the following graphs to be drawn (figure 4-22).<br />

179

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!