 
Multiple Linear Regression Analysis

DEFINITION OF THE SYNTAX OF A USER PROGRAM

     The syntax of a user program is defined in an extended  version  of  a
notation  known  as the Backus Naur Form (BNF).  The extensions comprise an
explicit repetition and optionality construct together with the possibility
of factorization.

     The BNF may be regarded as a metalanguage for  the  description  of  a
user  program.   In  addition  to the symbols that are admissible in a user
program, the metalanguage  requires  a  number  of  extra  symbols,  called
metasymbols.   The ten metasymbols used in extended BNF are:  ::=, |, <, >,
{, }, [, ], ( and ).  The , and . are part of the metalanguage  English  in
which we are describing BNF.  We write:

          <expression>::= ['+' | '-'] <term> { ('+' | '-') <term> }

     The metasymbols < and > are used as delimiters to enclose the name  of
a class.  The metasymbol ::= may be read as 'is defined as' or as 'consists
of'.  The metasymbol | is read as 'or'.  Repetition  is  denoted  by  curly
brackets,  i.e. { a } stands for e | a | aa | ...  Optionality is expressed
by square brackets, i.e.  [ a ] stands for e | a.  Parentheses merely serve
for  grouping (factorization) i.e.  (a | b) c stands for ab | ac.  Terminal
symbols appear enclosed in single apostrophes.

     The above phrase defines an expression as a term, optionally preceeded
by  a  '+'  or a '-' and followed by an arbitrary repetition of terms, each
preceeded by a '+' or a '-'.

The syntax of a user program can thus be defined as follows:

<letter>::= 'A'|'B'|'C'|'D'|'E'|'F'|'G'|'H'|'I'|'J'|'K'|'L'|'M'|
            'N'|'O'|'P'|'Q'|'R'|'S'|'T'|'U'|'V'|'W'|'X'|'Y'|'Z'|
            'a'|'b'|'c'|'d'|'e'|'f'|'g'|'h'|'i'|'j'|'k'|'l'|'m'|
            'n'|'o'|'p'|'q'|'r'|'s'|'t'|'u'|'v'|'w'|'x'|'y'|'z'

<digit>::= '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'

<model keyword>::= '"Model"' | '"MO"'
<input keyword>::= '"Input"' | '"IN"'
<option keyword>::= '"Options"' | '"OP"'
<data keyword>::= '"Data"' | '"DA"'
<run keyword>::= '"Run"' | '"RU"'
<exit keyword>::= '"Exit"' | '"EX"'

<function name>::= 'Abs' | 'Sign' | 'Sqrt' | 'Sin' | 'Cos' | 'Tan' |
                   'Ln' | 'Log' | 'Exp' | 'Entier' | 'Round' | 'Mod' |
                   'Min' | 'Max' | 'Arcsin' | 'Arccos' | 'Arctan' |
                   'Sinh' | 'Cosh' | 'Tanh' | 'Indicator'

<option name>::= 'Transformed data matrix' | 'Correlation matrix' |
                 'Residual analysis' | 'No regression analysis' |
                 'Process submodels' | 'Print input data' |
                 'No input data rewind' | 'Save original model' |
                 'Test reduced model' | 'Missing values'

<option number>::= '1' | '2' | '3' | '4' | '5' |
                   '6' | '7' | '8' | '9' | '10'

<number>::= ['+' | '-'] <unsigned number>
<unsigned number>::= <decimal number> | <exponent part> |
                     <decimal number> <exponent part>
<decimal number>::= <unsigned integer> | <fractional part> |
                    <unsigned integer> <fractional part>
<exponent part>::= '#' <integer>
<fractional part>::= '.' [ <unsigned integer> ]
<integer>::= ['+' | '-'] <unsigned integer>
<unsigned integer>::= <digit> { <digit> }

<identifier>::= <letter> { <letter> | <digit> }

<data specification>::= <data keyword> [ <input data> ]
<input data>::= <number> { <number> }

<option specification>::= <option keyword> [ <option statement> ] ';'
<option statement>::= <option> { ',' <option> }
<option>::= <simple option> [ '(' <specifier list> ')' ]
<simple option>::= <option name> | <option number>
<specifier list>::= <specifier> { ',' <specifier> }
<specifier>::= <number>

<input specification>::= <input keyword> <input statement> ';'
<input statement>::= <input part> { ',' <input part> }
<input part>::= <control> | <description> | <control> '*' <description>
<control>::= <number> | <identifier> | '<' <expression> '>'
<description>::= '(' <input statement> ')' | '[' <variable list> ']'
<variable list>::= <variable> { ',' <variable> }
<variable>::= <identifier>

<model specification>::= <model keyword> <model statement> ';'
<model statement>::= <left hand part> '=' <right hand part>
<left hand part>::= <expression> [ '&' <weight part> ]
<weight part>::= <expression>
<right hand part>::= ['+'] <term> { '+' <term> }
<expression>::= ['+' | '-'] <term> { ('+' | '-') <term> }
<term>::= <factor> { ('*' | '/' | ':') <factor> }
<factor>::= <primary> { '^' <primary> }
<primary>::= <unsigned number> | <identifier> |
             <function designator> | '(' <expression> ')'
<function designator>::= <function name> [ '(' <parameter list> ')' ]
<parameter list>::= <parameter> { ',' <parameter> }
<parameter>::= <expression>

<user program>::= { <job> } <exit keyword>
<job>::= { <specification> } <run keyword>
<specification>::= <model specification> | <input specification> |
                   <option specification> | <data specification>
 
