Multiple Regression Analysis

Author(s): Ronny Richardson
Publication: Syntax
Pub Details: Syntax/Syntax ZX80 v4 n11 (Volume 4, Issue 11)
Date: November 1983
Pages: 20
Name:  Multiple Regression Analysis
Type:  Statistical Analysis
  Price:  $15.95
ROM/RAM required:  8K/16K min.
Printed Listings?  No
Program Listable?  Yes
Easy to load?  Yes
 Easy to use?  No
  Written in:  BASIC
    Display:  Functional
       From:  Programmers at Large
              POB 24362
              Fort Worth,
              TX 76112-9362

This program does a very good job number crunching. To test it, I used data involving 95 observations on 8 variables. An IBM-360 mainframe gave me these results:

Y=2.9+.12X(1)+.96X(2)-1.91X(3)+1.82X(4)+2.36X(5)+32.37X(6)+3.67X(7) with r^2=.95 and F=237.8

My ZX81 and this program gave:

Y=3.06+.114X(1)+.959X(2)-1.91X(3)+1.829X(4)+2.36X(5)+32.33X(6)+3.673X(7) with r^2=.95 and F=237.15

While MRA crunches numbers well, it displays three major categories of flaws. One, it is not user-friendly. Two, it leaves out important results. And three, it shows evidence of poor programming.

According to the instructions, you should redimension five arrays based on the number of variables and observations, but the instructions don’t tell you how and the program self-starts. They indicate that with 20 variables and 200 observations you would DIM T(4000), but 16K will not allow this. The program does not let you review data entered to check for errors nor correct data.

In using multiple regression, you must know whether the data has multicollinearity. (Multicollinearity results when two or more independent variables are correlated. For example, if you want to develop an equation to predict the density of water using observations on the height from sea level, temperature in degrees C and degrees K, you would find perfect correlation, and thus perfect multicollinearity, between the two temperatures. This renders the resulting equation invalid.) In research using regression, we commonly withhold some data when developing the equation. Then we apply this data to the resulting equation to see how well it predicts. MRA does not let you use the equation at all.

You need not redimension five arrays. Delete lines 3, 4, 10, 15 and 20 and add:

101 DIM T(N*M)
102 DIM M(N)
103 DIM Y(N)
104 DIM X(N)
105 DIM R(N*(N+1))

At a cost of seven bytes, the program now self-dimensions.

MRA wastes about 130 bytes on REM statements and 20 bytes by using E-N-T-E-R instead of ENTER in PRINT statements. It uses no string variables although this would also save memory.

As MRA now stands, I cannot recommend it. I had to spend several hours cleaning up major flaws before I could test it. Developing a multicollinearity matrix may exceed the limits of a 16K machine, but all my other corrections result in a net memory savings. If the authors correct these flaws, I would rate MRA as excellent.