1. Home
  2. FWITHINTERMS procedure

FWITHINTERMS procedure

Forms factors to define terms representing the effects of one factor within another factor (R.W. Payne).

Options

LEVNULL = scalar Numerical value to represent the null level assigned to units not involved in the comparison of the levels of one of the factors within a particular level of the other factor; default 0
LABNULL = text String to label the null level; default '-'

Parameters

F1 = factors First factor
F2 = factors Second factor
F1WITHINF2 = pointers Pointer containing a factor for each level of the second factor, used to estimate the effects of the first factor within that level
F2WITHINF1 = pointers Pointer containing a factor for each level of the first factor, used to estimate the effects of the second factor within that level

Description

When there is an interaction between two factors, it may be interesting to compare the effects of one factor within each level of the other factor. FWITHINTERMS forms factors to define terms to enable you to do this.

The two factors are specified by the F1 and F2 parameters. The F1WITHINF2 parameter saves a pointer containing a factor for each level of the F2 factor, to be used to assess the effects of F1 within that level. To do this you can specify a model formula of

F2 / F1WITHINF2[]

The term F2 represents the main effect of factor F2. Subsequent terms like F2.F1WITHINF2[i] represent the effects of F1 within level i of factor F2. To help make the output clear, the elements of F1WITHINF2 are labelled by the levels of F2 (or its labels if available). Each factor has the levels of F1 for the units with its corresponding level of F2, and a “null” level elsewhere. The numerical value to represent the null level is specified by the LEVNULL option (default 0). If F1 has labels, the label for the null level is specified by the LABNULL option (default '-').

Similarly, the F2WITHINF1 parameter saves a pointer containing factors to assess the effects of F2 within F1.

Options: LEVNULL, LABNULL.
Parameters: F1, F2, F1WITHINF2, F2WITHINF1.

See also

Procedure: FBETWEENGROUPVECTORS.
Commands for: Calculations and manipulation, Analysis of variance.

Example

CAPTION      'FWITHINTERMS example',\
             !t('Experiment on canola with two treatment factors,',\
             'N (nitrogen) and S (sulphur), in a randomized-block design');\
             STYLE=meta,plain
SPLOAD       [PRINT=*] '%data%/Canola.gsh'
BLOCK        block / plot
TREATMENTS   N * S
ANOVA        [PRINT=aovtable,means; FPROBABILITY=yes] yield
FWITHINTERMS F1=S; F2=N; F1WITHINF2=SwithinN; F2WITHINF1=NwithinS
PRINT        N,S,SwithinN[],NwithinS[]; DECIMALS=0
" sulphur within nitrogen "
TREATMENTS   N / SwithinN[]
ANOVA        [PRINT=aovtable,means; FPROBABILITY=yes] yield
" nitrogen within sulphur "
TREATMENTS   S / NwithinS[]
ANOVA        [PRINT=aovtable,means; FPROBABILITY=yes] yield
Updated on February 4, 2022

Was this article helpful?