1. Home
  2. G2AFACTORS procedure

G2AFACTORS procedure

Redefines block and treatment variables as factors (R.W. Payne).

No options

Parameter

FACTOR = variates or texts Other variates or texts to convert into factors (if required)

Description

G2AFACTORS is one of a suite of procedures provided to simplify the use of Genstat to analyse data from the Agronomix Generation II system (see agronomix.com).

Data can be transferred to Genstat by writing a dbase file within Generation II, and reading this into Genstat using the IMPORT procedure. By default, IMPORT loads columns containing textual strings into Genstat text structures, and columms of numbers into variates. So, before data are analysed, some of the columns will need to be defined as factors. IMPORT allows this to be done by setting its COLUMNS parameter. An alternative (and simpler) method may be to use G2AFACTORS.

If analysis of variance is to be used, the BLOCKSTRUCTURE and TREATMENTSTRUCTURE directives will need to be used to define the block and treatment models for the analysis. If you then call G2AFACTORS, it will look through the models and redefines any texts or variates that they contain as factors, automatically, ready for the analysis (by the ANOVA directive).

If the analysis is to be done in some other way (e.g. by REML) you can still use G2AFACTORS, and use the FACTOR parameter specify the variates and texts that need to be converted,

Options: none.

Parameter: FACTOR.

Method

The GET directive is used to access the current settings define by the BLOCKSTRUCTURE and TREATMENTSTRUCTURE directives. The FCLASSIFICATION directive obtains the list of variables involved in the model, and the GROUPS directive (with option REDEFINE=yes) does the redefinition.

See also

Directives: ANOVA, BLOCKSTRUCTURE, TREATMENTSTRUCTURE, REML.

Procedures: G2AEXPORT, G2VEXPORT.

Commands for: Analysis of variance, REML analysis of linear mixed models.

Example

CAPTION 'G2AEXPORT example',\
        !t('Randomized block design to assess five different diets',\
        'using rats from eight litters i.e. blocks (John & Quenouille,',\
        '1977, Experiments Design and Analysis, page 32).');\
        STYLE=meta,plain
" read data into variates and text "
TEXT    Diet
READ    Litter,Rat,Diet,Gain
  1 1 E 76.0  1 2 C 70.7  1 3 D 68.3  1 4 A 57.0  1 5 B 64.8
  2 1 A 55.0  2 2 D 67.1  2 3 B 66.6  2 4 C 59.4  2 5 E 74.5
  3 1 C 64.5  3 2 A 62.1  3 3 D 69.1  3 4 E 76.5  3 5 B 69.5
  4 1 D 72.7  4 2 B 61.1  4 3 A 74.5  4 4 C 74.0  4 5 E 86.6
  5 1 A 86.7  5 2 E 94.7  5 3 B 91.8  5 4 D 90.6  5 5 C 78.5
  6 1 B 51.8  6 2 C 55.8  6 3 E 43.2  6 4 A 42.0  6 5 D 44.3
  7 1 D 53.8  7 2 A 71.9  7 3 C 63.0  7 4 B 69.2  7 5 E 61.1
  8 1 E 54.4  8 2 D 40.9  8 3 B 48.6  8 4 C 48.1  8 5 A 51.5 :
BLOCKSTRUCTURE Litter/Rat
TREATMENTSTRUCTURE Diet
" redefine the block and treatment variables as factors "
G2AFACTORS
" analysis of variance of the gain in weight "
ANOVA [FPROBABILITY=yes] Gain
Updated on March 7, 2019

Was this article helpful?