Determines the marginal terms for the terms in a model formula (R.W. Payne).
Options
TERMS = formula |
Terms whose marginal terms are required |
FACTORIAL = scalar |
Limit on the number of factors in the terms; default * i.e. no limit |
INDIVIDUALTERMS = pointer or formulae |
Saves the individual terms from the TERMS formula |
DROPPABLE = variate |
Contains 1 or 0 according to whether or not each term can be dropped from the TERMS formula |
MARGINALTERMS = pointer or formulae |
Marginal terms for each term in the TERMS formula |
MARGINALTERMS = variate |
The number of marginal terms for each term in the TERMS formula |
Parameters
No parameters
Description
FMARGINALTERMS
is useful when you want to decide on the strategy for testing the terms in a model formula. The formula is specified by the TERMS
option. The individual terms that it defines can be saved by the INDIVIDUALTERMS
option, in a pointer containing a model formula for each term.
FMARGINALTERMS
can tell you which terms can be dropped once they have all been fitted. These are the terms that are not marginal to any other term in the model. For example, in the model formula A*B*C, which expands to
A + B + C + A.B + A.C + B.C + A.B.C
The term A cannot be dropped as it is marginal to A.B, A.C and A.B.C. Another example is that B.C cannot be dropped as it is marginal to A.B.C. The only term that can be dropped is A.B.C. This information can be saved by the DROPPABLE
option, in a variate with a value for each term containing one if the term can be dropped or zero otherwise.
The MARGINALTERMS
option can save a pointer, with a model formula for each term, containing the terms that are marginal to that term. The NMARGINALTERMS
option saves a variate containing the number of terms marginal to each term.
Options: TERMS
, FACTORIAL
, INDIVIDUALTERMS
, DROPPABLE
, MARGINALTERMS
, NMARGINALTERMS
Parameters: None
See also
Directives: FCLASSIFICATION
GenStat Reference Manual 1 Summary section on: Calculations and manipulation.
Example
CAPTION 'FMARGINALTERMS example'; STYLE=meta FMARGINALTERMS [TERMS=A*B*C*D; INDIVIDUALTERMS=term; DROPPABLE=drop;\ MARGINALTERMS=marginal; NMARGINALTERMS=nmarginal] FOR [INDEX=i; NTIMES=NVALUES(drop)] PRINT [SQUASH=yes; ORIENT=across] term[i] PRINT [SQUASH=yes] nmarginal$[i],'marginal terms; droppable',drop$[i],'.';\ FIELD=1; DECIMALS=0; SKIP=0,1,1,0 IF nmarginal$[i].GT.0 PRINT [SQUASH=yes] marginal[i] ENDIF SKIP [FILE=output] 1 ENDFOR