\START\ \COMMENT=Program file dated 06/28/93, 16:37 \NAME=LNREG \FILE=LNREG.85P Func:FnOff Radian ClLCD ClDrw Disp "FIRST ENTER X AND Y" Disp "VALUES USING THE" Disp "''STAT'' EDITOR" Disp "" Disp "HIT ENTER TO CONTINUE" Pause Lbl QQ ClLCD Disp "(1) SCATTER PLOT" Disp "(2) REGRESSION LINE" Disp "(3) REGRESSION EQ" Disp "(4) STAT VALUES" Disp "(5) PREDICT VALUES" Disp "(6) QUIT" Input "ENTER 1,2,3,4,5,6 ",Z If Z==6 Goto WW LinR If min(xStat)<0 Then min(xStat)\->\xMin Else 0\->\xMin End max(xStat)\->\xMax If min(yStat)<0 Then min(yStat)\->\yMin Else 0\->\yMin End max(yStat)\->\yMax If Z==1 Then Scatter Pause Goto QQ End If Z==2 Then DispG "b x+a"\->\E1 \St>Eq\(E1,EQ) evalF(EQ,x,xMax)\->\YM evalF(EQ,x,xMin)\->\Y2 Line(xMin,Y2,xMax,YM) Pause Goto QQ End If Z==3 Then ClLCD Disp "REGRESSION EQ =" Disp "Y = m x + b" Disp "" Disp "m = " Outpt(4,5,b) Disp "b = " Outpt(5,5,a) Disp "CORR COEF =" Outpt(6,12,corr) Disp "HIT ENTER TO CONTINUE" Pause Goto QQ End If Z==4 Then ClLCD Disp "n = " Outpt(1,5,n) Disp "\Sigma-x\ = " Outpt(2,6,\Sigma-x\) Disp "\Sigma-y\ = " Outpt(3,6,\Sigma-y\) Disp "\Sigma-xy\ = " Outpt(4,7,\Sigma-xy\) Disp "\Sigma-x^2\ = " Outpt(5,7,\Sigma-x^2\) Disp "(\Sigma-x\)\^2\ = " Outpt(6,9,(\Sigma-x\)\^2\) Disp "HIT ENTER TO CONTINUE" Pause ClLCD Disp "\x-bar\ = " Outpt(1,5,\x-bar\) Disp "\y-bar\ = " Outpt(2,5,\y-bar\) Disp "\Sigma-y^2\ = " Outpt(3,7,\Sigma-y^2\) Disp "(\Sigma-y\)\^2\ = " Outpt(4,9,(\Sigma-y\)\^2\) Disp "\Sx\ = " Outpt(5,6,\Sx\) Disp "\Sy\ = " Outpt(6,6,\Sy\) Disp "HIT ENTER TO CONTINUE" Pause Goto QQ End If Z==5 Then ClLCD Disp "ENTER x AND PREDICT y" Disp "" Prompt X evalF(EQ,x,X)\->\Y Disp "" Disp "y = " Outpt(5,5,Y) Disp "" Disp "HIT ENTER TO CONTINUE" Pause Goto QQ End Lbl WW ClLCD \STOP\