Trailing-Edge
-
PDP-10 Archives
-
decuslib10-08
-
43,50504/mulmod.rnh
There are 2 other files named mulmod.rnh in the archive. Click here to see a list.
.LM0;.RM75;.LC;.AP;.FLAG CAPITAL;.NO PAGING;.NO NUMBER;#
.BR;^MULTIPLE ^LINEAR ^REGRESSION ^ANALYSIS
.SK;^^THE MODEL SPECIFICATION\\
^TO LET THE PROGRAM KNOW BETWEEN WHICH VARIABLES THE STATISTICIAN EXPECTS
A CERTAIN KIND OF RELATIONSHIP, HE MUST PROVIDE A MODEL SPECIFI- CATION,
WHICH CONSISTS OF THE KEYWORD "^MODEL" FOLLOWED BY A FORMULA (THE MODEL
STATEMENT), WHICH RESEMBLES THE NOTATION OF REGRESSION MODELS IN COMMON STATISTICAL
LITERATURE QUITE CLOSELY. ^FOR INSTANCE:
.SK;.C;"^MODEL" Y = ALPHA0 + ALPHA1 * X1 + ALPHA2 * X2;
^A MODEL FORMULA CONSISTS OF AN IDENTIFIER TO DENOTE THE DEPENDENT
VARIABLE (THE LEFT HAND PART), FOLLOWED BY AN '='#(EQUAL), FOLLOWED BY
THE SUM OF A NUMBER OF TERMS (THE RIGHT HAND PART), WHILE IT IS TERMINATED
WITH A ';'#(SEMICOLON). ^EACH TERM MUST
BE THE PRODUCT OF AN IDENTIFIER TO DENOTE THE PARAMETER (WHICH IS TO BE
ESTIMATED) AND AN IDENTIFIER TO DENOTE THE INDEPENDENT VARIABLE.
^AN EXCEPTION IS MADE FOR THE OPTIONAL CONSTANT TERM,
WHICH IS GIVEN AS A SINGLE IDENTIFIER DENOTING THAT CONSTANT TERM,
AND WHICH MAY BE PLACED ANYWHERE IN THE MODEL.
^EACH IDENTIFIER MUST START WITH A LETTER AND IS ALLOWED TO CONTAIN ANY
NUMBER OF LETTERS, DIGITS AND BLANKS.
^AS MOST PERIPHERAL EQUIPMENT OF A COMPUTER IS UNABLE TO
PROCESS SUB- OR SUPERSCRIPTIONS OR ^GREEK LETTERS, WE WRITE ALPHA0, ALPHA1
AND ALPHA2. ^IDENTIFIERS HAVE NO INHERENT MEANING, BUT SERVE FOR THE
IDENTIFICATION OF VARIABLES, PARAMETERS AND FUNCTIONS. ^THEY MAY BE CHOSEN
FREELY (EXCEPT FOR THE TWENTYONE STANDARD FUNCTION NAMES AND THE TEN OPTION
NAMES, CF.#"^HELP"/^OPTIONS). ^IT IS ADVISED NOT TO USE THE SAME
IDENTIFIER TO DENOTE TWO (OR MORE) DIFFERENT QUANTITIES; FOR
REGRESSION PARAMETERS, HOWEVER, IT WILL NOT LEAD TO FATAL ERRORS, WHEREAS FOR
THE DEPENDENT AND INDEPENDENT VARIABLES DISTINGUISHABLE IDENTIFIERS MUST BE USED INDEED.
^CORRECT MODEL FORMULAE ARE FOR INSTANCE:
.SK;.C;"^MODEL" Y VARIABLE = CONSTANT + PARAMETER * X VARIABLE;
.BR;AND
.BR;.C;"^MODEL" DEPVAR = CONST + BETA1 * XVAR1 + BETA2 * XVAR2;
.SK2;^^TRANSFORMATIONS\\
^ALMOST ALL TRANSFORMATIONS A USER WOULD LIKE TO PERFORM ON HIS INPUT DATA FIT
QUITE NATURALLY IN THE MODEL FORMULA: EACH TRANSFORMATION IS EXPRESSED AS A
FORMULA ITSELF. ^IF, FOR INSTANCE, THE USER WANTS TO INCLUDE IN THE MODEL FORMULA
AS AN INDEPENDENT VARIABLE THE NATURAL LOGARITHM OF THE SUM OF TWO OTHER
VARIABLES, HE WRITES: (IF THOSE TWO OTHER VARIABLES ARE CALLED: XVAR1 AND
XVAR2)
.SK;.C;^LN (XVAR1 + XVAR2) .
.SK;^IN MODEL FORMULAE THE OPERATORS '+'#(PLUS), '-'#(MINUS), '*'#(ASTERISK),
AND '/'#(SLASH) ARE ALLOWED, ALL WITH THEIR CONVENTIONAL MEANING OF
ADDITION, SUBTRACTION, MULTIPLICATION AND DIVISION RESPECTIVELY.
^OF COURSE THE NORMAL OPERATOR PRECEDENCE RULES ARE OBEYED.
^SPECIAL OPERATORS ARE: ':'#(COLON), INTEGER DIVISION
AND##'_^'#(UPARROW), EXPONENTIATION.
.BR;^THE OPERATION TERM#:#FACTOR IS DEFINED ONLY FOR OPERANDS BOTH OF
TYPE INTEGER AND WILL YIELD A RESULT OF TYPE INTEGER, WITH THE SAME
SIGN AS WOULD BE OBTAINED BY NORMAL DIVISION, WHILE THE MAGNITUDE IS
FOUND BY DIVIDING THE TWO QUANTITIES AND TAKING THE WHOLE PART; MATHEMATICALLY
IT CAN BE DEFINED AS: A#:#B#=#^SIGN#(A#/#B)#*#^ENTIER#(^ABS#(A#/#B)),
.BR;FOR INSTANCE: 5#:#2#=#2 AND -7#:#2#=#-3.
.BR;^THE OPERATION FACTOR#_^#PRIMARY DENOTES EXPONENTIATION, WHERE
THE FACTOR IS THE BASE AND THE PRIMARY IS THE EXPONENT,
.BR;FOR INSTANCE: 5#_^#2#=#25 AND 2#_^#3#_^#2#=#64 BUT 2#_^#(3#_^#2)#=#512.
.SK;^ALSO THE FOLLOWING TWENTYONE STANDARD FUNCTIONS ARE ALLOWED:
.LM+3;.RM-3;.SK
^ABS#(^E), ^SIGN#(^E), ^SQRT#(^E), ^SIN#(^E), ^COS#(^E), ^TAN#(^E), ^LN#(^E),
^LOG#(^E), ^EXP#(^E), ^ENTIER#(^E), ^ROUND#(^E), ^MOD#(^E1,#^E2), ^MIN#(^E1,#^E2),
^MAX#(^E1,#^E2), ^ARCSIN#(^E), ^ARCCOS#(^E), ^ARCTAN#(^E), ^SINH#(^E),
^COSH#(^E), ^TANH#(^E) AND ^INDICATOR#(^E1,#^E2,#^E3)
.LM-3;.RM+3;.SK
IN WHICH ^E, ^E1, ^E2 AND ^E3 ARE EXPRESSIONS IN TERMS OF VARIABLES,
OPERATORS AND STANDARD FUNCTIONS. ^ROUND (^E) IS DEFINED AS: ^ENTIER (^E + 0.5) AND
.BR;^INDICATOR (^E1,#^E2,#^E3) IS DEFINED AS: <IF ^E1 _<= ^E2 _<= ^E3 <THEN 1 <ELSE 0.
^THE DEPENDENT VARIABLE MAY BE TRANSFORMED IN A SIMILAR WAY AND AS A
CONSEQUENCE THE MODEL FORMULA IN ITS MOST GENERAL FORM LOOKS LIKE:
.SK;###"^MODEL" ^G (Y) = B0 + B1 * ^F1 (X1,...,XM) +#...#+ BP * ^FP (X1,...,XM);
.SK;^SOME EXAMPLES OF TRANSFORMED MODEL FORMULAE ARE:
.SK;.C;"MODEL" Y = A0 + A1 * ^SQRT (X1 + X2) + A2 * ^SQRT (X3);
.BR;AND
.BR;.C;"<MODEL" ^ARCSIN (^SQRT (^Y)) = ^A0 + ^A1 * ^X + ^A2 * ^X _^ 2;
^A USER CAN SPECIFY MODEL FORMULAE IN WHICH TERMS WITH KNOWN REGRESSION
COEFFICIENTS APPEAR, BY SUBTRACTING THOSE TERMS FROM THE LEFT HAND PART OF
THE MODEL FORMULA, FOR INSTANCE:
.SK;.C;"^MODEL" Y - 5.4321 * X3 = A0 + A1 * X + A2 * X _^ 2;
.SK;^THIS APPLIES ESPECIALLY TO THE CONSTANT TERM; IF THIS TERM IS KNOWN IT MUST
BE SHIFTED TO THE LEFT HAND PART.
^IF WEIGHTS ARE PRESENT IN THE INPUT DATA (OR CAN BE COMPUTED OUT OF THE
INPUT DATA), TO INDICATE THAT THE VARIANCES OF THE OBSERVATIONS ARE NOT ALL
EQUAL (CF.#"^HELP"/^THEORY), THE LEFT#HAND#PART OF THE MODEL#FORMULA CAN BE EXPANDED WITH A SO CALLED
WEIGHT#PART (WHICH CAN BE AN EXPRESSION), PRECEEDED BY A '_&'#(AMPERSAND),
FOR INSTANCE:
.SK;.C;"^MODEL" ^DEPVAR _& ^MAX (^ABS (^WEIGHT), 10) = ^CONST + ^PARAM * ^INDEPVAR;
.BR;#