1. Home
  2. Including Analysis Commands in a Spreadsheet

Including Analysis Commands in a Spreadsheet

This option allows you to embed commands within a spreadsheet so that you can repeat the same analysis more conveniently with a different data set. This method can also simplify analysis for a user who may not be familiar with the correct way to specify the statistical analysis; a novice user can be given the .gsh file containing the design columns and they can just add in the data columns as collected, then use the menu to get the correct analysis.

There are two sections of Genstat directives: the Setup section that is accessed by clicking Setup (these commands are run once only) and the Analysis commands section, which is run once for each selected column using a FOR directive. The Dummy field specifies the name of the dummy variable used by the FOR loop. The selected columns in the Select columns for analysis list are used as the list of variables in the FOR statement.

Note: You can find a more detailed description of how to use this feature in the Introduction to Genstat Command Language pdf, which is available by selecting Help | Genstat Guides | Introduction to Genstat Command Language. An example of the setup commands is described on this page https://genstat.kb.vsni.co.uk/knowledge-base/analyse-spreadsheet-columns/

  1. Open the spreadsheet you want to embed commands within then select Spread | Sheet | Analysis.
  2. Either type or cut and paste your analysis commands into the lower section.
    (For a full list of available commands refer to the Introduction to Genstat Command Language pdf, which is available by selecting Help | Genstat Guides | Introduction to Genstat Command Language).

  3. To set the commands to refer to an arbitrary explanatory variate (denoted by the dummy ‘Y’) click Replace then type the variate name.

  4. Click OK. This replaces the variate name with the dummy name in the Analysis commands section.

  5. To store the commands with the spreadsheet click Save and close.
    You can now run this analysis at any time.
  6. To run the analysis on specific columns, re-open the window by selecting Spread | Sheet | Analysis.
  7. Select one or more columns then click Run.

The results will be displayed in the Output window for each column you selected.

Updated on June 20, 2019

Was this article helpful?