(11C) Multiple Linear Regression for HP-11C
|
01-26-2014, 08:39 PM
(This post was last modified: 06-15-2017 01:30 PM by Gene.)
Post: #1
|
|||
|
|||
(11C) Multiple Linear Regression for HP-11C
To perform the regression of the following linear model:
Y = a + bX + cZ We transform it into the following equations: (Y-Ymean)/(X-Xmean) = b + c*(Z-Zmean)/(X-Xmean) Then Calculate a using: a = Ymean - b*Xmean - c*Zmean Memory Map RCL 6 = Ymean RCL 7 = Xmean RCL 8 = Zmean RCL 9 = X - Xmean Flags F0 = When internally set, the program goes into data deletion mode. Listing Code: 1 LBL B # Enter Y before pressing B. Use this label to delete data Usage Phase 1 In this phase perform the following: 1. Clear teh statistical registers 2. Enter the values of Y. 3. Calculate the mean value of Y and record it. 4. Clear teh statistical registers 5. Enter the values of X. 6. Calculate the mean value of X and record it. 7. Clear teh statistical registers 8. Enter the values of Z. 9. Calculate the mean value of Z and record it. 10. Clear the statistical registers. 11. Enter teh means for Y, X, and Z in registers 6, 7, and 8 respectively. Phase 2 1. Enter the value of Y and press the keys f and A. 2. Enter the value of X and press R/S. 3. Enter the value of Z and press R/S. 4. Repeat steps 1 through 3 for all the observations. 5. To calculate the values of coefficients b and c, press the keys f and C. The program, displays the value of coefficient b in the X register. 6. Press the key X<>Y to view and record the value of coefficient c. 7. Press the key X<>Y. 8. Press the key R/S to display the coefficient a. To delete a data point: 1. Enter the value of Y and press the keys f and B. 2. Enter the value of X and press R/S. 3. Enter the value of Z and press R/S. Example Give the following data: Code: Y X Z In phase 1 calculate the mean for Y as 2.4, the mean for X as 3.1, and the mean for Z as 46. Store these means in registers 6, 7, and 8, respectively. 1. Enter the value of -4.5 and press the keys f and A. 2. Enter the value of 1 and press R/S. 3. Enter the value of 33 and press R/S. 4. Repeat steps 1 through 3 for all the above observations. 5. To calculate the values of coefficients b and c, press the keys f and C. The program, displays the 2.000 as the value of coefficient b in the X register. 6. Press the key X<>Y to view and record -0.30000 as the value of coefficient c. 7. Press the key X<>Y. 8. Press the key R/S to display 10.000 as the coefficient a. The model is Y = 10 + 2*X - 0.3*Z |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)