Command File

Purpose

ASReml is essentially a batch program controlled with a command file. The command file normally has a filename extension .as.

Which editor

You will need an ASCII file editor to create the command file and to view the various output files.
  • On unix systems,
  • vi and emacs are commonly used. ASReml-W is also available.
  • Under Windows,
  • there are several suitable program editors available such as ASReml-W and ConText.

    General rules

    In the ASReml command file
  • all characters following a
  • # symbol on a line are ignored,
  • all blank lines are ignored,
  • lines beginning with
  • ! followed by a blank are copied to the .asr file as comments for the output,
  • a blank is the usual separator; TAB is also a separator,
  • maximum line length is 2000 characters,
  • the
  • // operator splits a line into two logical lines,
  • a comma as the last character on the line is used to
  • indicate that the current list is continued on the next line; a comma is not needed when ASReml knows how many values to read,
  • reserved words used in specifying the linear model
  • are case sensitive; they need to be typed exactly as defined: they may not be abbreviated.
  • a qualifier is a particular letter sequence beginning with an
  • ! which sets an option or changes some aspect of ASReml;
  • some qualifiers require arguments,
  • qualifiers must appear on the correct line,
  • qualifier identifiers are not case sensitive,
  • qualifier identifiers may be truncated to 3 characters.
  • A minimal job

    Every commandfile has at least four lines, in the order
  • Title line - gives a heading for the job
  • data field names - as they occur in the data file (indent these lines)
  • name of the data file
  • model line
  • Example


     NIN alliance trial 1989      # Title line
      variety !A                  # names of data fields
      id                          # !A indicates 'variety' is a factor/class variable
      pid                         #    with alphanumeric class names
      raw
      repl 4                      #  4 indicates 'repl' is a factor/class variable
      nloc                        #    coded  1, 2, 3, 4
      yield                       # 'yield' is a variate
      lat
      long
      row 22                      # 'row' and 'column' define plot locations
      column 11                   #       in an 11 x 22 grid
     nin89.asd !skip 1 !DOPATH $1 # datafile line
    
     !PATH 1                      # RCB analysis
     tabulate yield ~ variety     # request simple variety means
     yield ~ mu variety !r repl   # Model Line
     predict variety              # request predicted variety means
    
     !PATH 2                       # Spatial Analysis
     yield ~ mu variety
     residual ar1(row, 0.5).ar1(column,0.3)
     predict variety
    

    Return to start