Google
 

Trailing-Edge - PDP-10 Archives - decus_20tap1_198111 - decus/20-0025/multex.txt
There is 1 other file named multex.txt in the archive. Click here to see a list.
00025 INSTRUCTIONS FOR USING 'MULREG' START AT LINE 100.  THOSE FOR
00050 THE PROGRAM 'MULTRY' START AT LINE 840.
00075  
00100 THESE ARE INSTRUCTIONS FOR USING THE MULTIPLE REGRESSION
00110 PROGRAM 'MULREG'.  THIS PROGRAM WILL PERFORM AN ANALYSIS
00120 FOR ONE DEPENDENT VARIABLE AND UP TO SIX INDEPENDENT VAR-
00130 IABLES.  THE DATA FOR THE DEPENDENT VARIABLE IS SUPPLIED
00140 ON LINES 100-108.  'MULREG' MAKES A DISTINCTION BETWEEN
00150 'INPUT' VARIABLES AND 'INDEPENDENT' VARIABLES, IN ORDER
00160 TO PROVIDE FLEXIBILITY IN RUNNING THE ANALYSIS WITH TRANS-
00170 FORMS OF THE INPUT VARIABLES AS THE INDEPENDENT VARIABLES.
00180 DATA FOR INPUT VARIABLE 'J' IS SUPPLIED ON LINES 1J0-1J8.
00190 IF NO TRANSFORMS ARE GIVEN, 'MULREG' WILL RUN A LINEAR
00200 MULTIPLE REGRESSION USING ALL THE INPUT VARIABLES AS THE
00210 INDEPENDENTS.  IF TRANSFORMS OF THE INPUT VARIABLES ARE
00220 DESIRED, THE TOTAL NUMBER OF INDEPENDENT VARIABLES TO BE
00230 INCLUDED IN THE ANALYSIS IS SUPPLIED ON LINE 200.  THEN 
00240 THE TRANSFORM FOR THE INDEPENDENT VARIABLE 'K' IS SUPPLIED
00250 ON LINE 2K0, AS A FUNCTION OF THE INPUT VARIABLES.  FOR
00260 THIS PURPOSE, THE INPUT VARIABLES ARE DENOTED BY THE
00270 SYMBOLS X1,X2,..,X6.  AS A SPECIFIC EXAMPLE, SUPPOSE IT
00280 WERE DESIRED TO RUN A LINEAR REGRESSION WITH TWO INDEPEN-
00290 DENT VARIABLES.  INPUT TO 'MULREG' MIGHT BE:
00300  
00310      100 DATA 12, 14, 17, 15, 16, 19, 21, 25
00320      110 DATA  2,  3,  2,  1,  5,  4,  6,  7
00330      120 DATA  7,  5,  6,  3,  2,  3,  2,  1
00340      RUN
00350  
00360 AT THE COMPLETION OF THE RUN, ONE MIGHT WANT TO TRY A RUN
00370 WITH ADDITIONAL VARIABLES, SUCH AS THE SQUARES OF THE TWO
00380 INPUT VARIABLES.  SINCE THE DATA AT LINES 100,110,AND 120
00390 REMAINS THE SAME, THE SECOND RUN IS MADE AFTER ADDING THE
00400 FOLLOWING LINES:
00410  
00420      200 DATA  4
00430      230 LET W3 = X1^2
00440      240 LET W4 = X2^2
00450      RUN
00460  
00470 THE EQUATION WHICH WILL BE FITTED ON THIS SECOND RUN IS
00480 THEN Y = A + B1*W1 + B2*W2 + B3*W3 + B4*W4 THAT TRANSFORMS
00490 TO Y = A + B1*X1 + B2*X2 + B3*X1^2 + B4*X2^2.  JUST TO
00500 CARRY THIS EXAMPLE ONE STEP FURTHER, SUPPOSE IT IS NOW
00510 DECIDED TO ADD A THIRD INPUT VARIABLE NOT PREVIOUSLY CON-
00520 SIDERED, TO DROP THE X1^2 TERM, AND TO ADD TO THE ANALYSIS
00530 TERMS IN THE LOGARITHM OF X2 AND THE PRODUCT OF X1 AND X3.
00540 THE ADDITIONAL INPUT FOR THIS THIRD RUN WOULD BE:
00550  
00560      130 DATA  5,  3,  7,  8,  9,  4,  6,  9
00570      200 DATA  5
00580      230 LET W3 = LOG(X2)
00590      250 LET W5 = X1*X3
00600      RUN
00610  
00620 THIS THIRD RUN WILL THEN BE A REGRESSION ANALYSIS OF
00630 Y = A + B1*W1 + B2*W2 + B3*W3 + B4*W4 + B5*W5 THAT TRANSFORMS TO
00640 Y = A + B1*X1 + B2*X2 + B3*X2^2 + B4*LN(X2) + B5*(X1*X3).
00650 ANY BASIC FUNCTIONS OF THE X1-X6 VARIABLES ARE ACCEPTABLE,
00660 AND IT SHOULD BE REMEMBERED THAT IF NO TRANSFORM IS GIVEN
00670 AT LINE 2K0, THE K-TH INDEPENDENT VARIABLE WILL BE THE K-TH
00680 INPUT VARIABLE.  ALSO, THE NUMBER OF INDEPENDENTS SPECIFIED
00690 ON LINE 200 DETERMINES HOW MANY OF THE TRANSFORMS WILL BE
00700 EFFECTIVE.  FOR EXAMPLE, ONE COULD FOLLOW THE THIRD RUN OF
00710 THE ABOVE EXAMPLE WITH THE INPUT
00720  
00730      200 DATA  2
00740      210 LET W1 = X2
00750      220 LET W2 = X3
00760      RUN
00770  
00780 AND THE PROGRAM WILL PERFORM AN ANALYSIS USING AS THE NEW
00790 REGRESSION EQUATION Y = A + B1*W1 + B2*W3 OR THE TRANSFORMATION;
00800 Y = A + B1*X2 +B2*X3, SINCE THE PROGRAM WILL IGNORE THE TRANSFORMS
00810 ALREADY ENTERED ON LINES 230, 240, AND 250.
00820  
00830   
00840 THESE ARE INSTRUCTIONS FOR USING THE PROGRAM 'MULTRY', WHICH
00850 ALLOWS THE USER TO SUCCESSIVELY ELIMINATE VARIABLES FROM A
00860 MULTIPLE REGRESSION ANALYSIS.  THE 'MULTRY' PROGRAM ACCEPTS
00870 DATA IN EXACTLY THE SAME WAY AS 'MULREG' EXCEPT THAT THERE
00880 CAN BE NO MORE THAN 35 DATA POINTS SUPPLIED TO 'MULTRY'.
00890 THE PROGRAM WILL FIRST FIT A REGRESSION EQUATION FOR AS MANY
00900 VARIABLES AS ARE CALLED FOR, THEN IT WILL AUTOMATICALLY
00910 ELIMINATE EACH VARIABLE IN TURN, PRINTING OUT THE INDEXES OF
00920 DETERMINATION FOR EACH NEW FITTED EQUATION.  THE PROGRAM
00930 WILL THEN ASK WHICH VARIABLE (IF ANY) IS TO BE ELIMINATED FOR
00940 THE NEXT STEP OF THE ANALYSIS.  IF THE QUESTION IS ANSWERED '0'
00950 THE PROGRAM WILL STOP, BUT IF A VARIABLE NUMBER IS GIVEN, THE
00960 PROGRAM WILL REMOVE THAT VARIABLE FROM FURTHER CONSIDERATION
00970 AND PROCEED AS BEFORE WITH THE REDUCED SET OF VARIABLES.  AT
00980 THE END, IT WILL STOP AUTOMATICALLY AFTER FITTING THE TWO
00990 SIMPLE LINEAR EQUATIONS FOR THE LAST VARIABLES LEFT IN THE
01000 ANALYSIS.   THE SAME DATA TAPE MAY THEN BE USED IN THE 'MULREG'
01010 PROGRAM TO OBTAIN DETAILED INFORMATION ON THE SELECTED REGRESSION.
01020   
01030   
01040 ONE LAST NOTE ON 'MULTRY':  THE PROCESS OF ELIMINATING
01050 VARIABLES SUCCESSIVELY IS NOT REPEAT NOT GUARANTEED TO
01060 YIELD THE BEST FITTING COMBINATION OF VARIABLES AT EACH
01070 LEVEL OF THE ELIMINATION.  IT IS POSSIBLE THAT THE BEST
01080 FIT WITH THREE INDEPENDENT VARIABLES WILL OCCUR WITH A
01090 REGRESSION EQUATION CONTAINING ONE OF THE VARIABLES PREV-
01100 IOUSLY ELIMINATED AS THE LEAST OF THE CONTRIBUTORS AT
01110 AN EARLIER STAGE, FOR EXAMPLE.  THIS WILL BE UNCOMMON,
01120 BUT SHOULD BE RECOGNIZED AS AN INHERENT LIMITATION IN
01130 THE 'ONE-VARIABLE-AT-A-TIME' APPROACH.
01140    
01150 END OF INSTRUCTIONS