84
ASReml tutorial A0 Overview – Installation Arthur Gilmour ASReml Tutorial: A0 Overview – Installation – p. 1

ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to [email protected] Licensed to: Arthur Gilmour *****

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

AS

Rem

ltu

tori

al

A0

Ove

rvie

w–

Inst

alla

tion

Art

hur

Gilm

our

AS

Rem

lTut

oria

l:A

0O

verv

iew

–In

stal

latio

n–

p.1

Page 2: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

ASReml tutorial

A0 Overview – Installation

Arthur Gilmour

ASReml Tutorial: A0 Overview – Installation – p. 2

Page 3: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Tutorial Overview

Some 16 sessions– prepared by Arthur Gilmour– made available on VSNi.co.uk website

Consisting of .mp3 audio files and slides

covering basic ASReml use and syntax– and typical examples

each session takes about 20 minutes

ASReml Tutorial: A0 Overview – Installation – p. 3

Page 4: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

asrwin.exe

The installation procedure uses InstallShieldto set up the ASReml directory structure andfile associations.

Installs ASReml 2.00 asC:\Program Files\ASReml2\bin\asreml.exe

Installs WinASReml,– an environment for running ASReml

ASReml Tutorial: A0 Overview – Installation – p. 4

Page 5: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Documentation

The User Guide is supplied as a PDF file.

A document describing the enhancements inrelease 2 over release 1 is supplied as a PDFfile.

Online help is supplied as HTML files.

ASReml Tutorial: A0 Overview – Installation – p. 5

Page 6: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Examples

The examples are discussed in the UserGuide.

Suggestion: copy the Examples folder to anew folder (sayMy Documents\ASReml\Exercises) where youcan modify it.

ASReml Tutorial: A0 Overview – Installation – p. 6

Page 7: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

WinASReml orConText

WinASReml– a new environment for running ASReml –installed with ASReml – allows reviewinggraph files – User must explicitly saverequired files

ConText– is a popular third party text editor – wellsuited for running ASReml – User mustexternally delete superfluous files

ASReml Tutorial: A0 Overview – Installation – p. 7

Page 8: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Context

Is an ideal editor to host the running ofASReml under Windows

http://www.context.cx/

Run ContextSetup.exeCopy ASReml.chl toC:\Program Files\Context\Highlighters

ASReml Tutorial: A0 Overview – Installation – p. 8

Page 9: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Context:Attach ASReml

<Options> <Environment Options>

<Execute keys>

<Add> file extentions as, asr<F9>Execute"C:\Program files\ASReml\bin\asreml.exe"

Start In %p, Parameters %f, Hint Asreml<Add> file extentions .pin<F9>Execute"C:\Program files\ASReml\bin\asreml.exe"

Start In %p, Parameters -p %f, Hint PIN file

ASReml Tutorial: A0 Overview – Installation – p. 9

Page 10: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Context:Attach UserGuide

<F11>Execute <ADOBE ACROBAT PATH>

Start In %p, Parameters"C:\Program files\ASReml\doc\UserGuide.pdf"

Find <ADOBE ACROBAT PATH> by rightclicking the ADOBE READER icon andselecting <Properties>

Similarly attach the Help file (say as <F12>)

ASReml Tutorial: A0 Overview – Installation – p. 10

Page 11: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Internet

[email protected]

http://www.asreml.co.uk/

ASReml discussion [email protected] join, mailto:[email protected]

Cookbook: http://uncronopio.org/ASReml

ASReml Tutorial: A0 Overview – Installation – p. 11

Page 12: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

ASReml tutorial

A1 Getting Started with ASReml

Arthur Gilmour

ASReml Tutorial: A1 Getting Started with ASReml – p. 12

Page 13: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Why start?Why am I here?

You understand the principles of linear mixedmodels

You want a flexible and comprehensiveprogram to fit them.

ASReml Tutorial: A1 Getting Started with ASReml – p. 13

Page 14: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

The focus of thisworkshop

Principles for using ASReml.

These slides originally prepared with AnimalBreeding focusWe will adapt to plant breeding.

Choosing appropriate variance models!

ASReml Tutorial: A1 Getting Started with ASReml – p. 14

Page 15: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Sessions A1 to A5

Mechanics of running ASReml

Basic principles

ASReml Tutorial: A1 Getting Started with ASReml – p. 15

Page 16: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Later Sessions

Animal models

Spatial models

Multienvironment trials

Multivariate Modelling

Repeated measures

Prediction and Testing

ASReml Tutorial: A1 Getting Started with ASReml – p. 16

Page 17: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Getting ASReml

http://www.asreml.co.uk

Windows version has automatic 30day demolicense.

Other platforms (Linux, Sun Solaris,Opteron): license available on request.mailto:[email protected]

Workshop based on release 2.

ASReml Tutorial: A1 Getting Started with ASReml – p. 17

Page 18: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Licensing

VSN-International

ASReml Tutorial: A1 Getting Started with ASReml – p. 18

Page 19: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Documentation

User Guide (Release 2.00)

ASReml updatehas summary of changes from 1 to release 2

Help file

Examples

Cookbook

ASReml Tutorial: A1 Getting Started with ASReml – p. 19

Page 20: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Installation(Windows)

InstallShield

C:\Program Files\ASReml2bin contains programdoc contains pdf manualexamples contains examples

ASReml Tutorial: A1 Getting Started with ASReml – p. 20

Page 21: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

A batch process

ASReml typically runs as a batch process– with minimal user interaction

Under Windows, run from– Windows Explorer - click on job file– Command Prompt (DOS Box) - typecommand – WinASReml (replaces ’MenuMode’ of release 1) – ConText

Under Unix, run from– command prompt – WinASReml

ASReml Tutorial: A1 Getting Started with ASReml – p. 21

Page 22: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

How it works.

Identify problem

Collect and organise data: save as ASCII(.txt, .csv, .asd) file

Prepare .as job file (Notepad, ConText,TextEdit, vi, emacs)

Run, Review, Revise, Rerun cycle

Report

ASReml Tutorial: A1 Getting Started with ASReml – p. 22

Page 23: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Zinc example

View Data

Fit oneway analysis of variance to SeedZn

View running

View output

ASReml Tutorial: A1 Getting Started with ASReml – p. 23

Page 24: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Zinc data

First few lines of ZINC.DAT areSource SeedZn LeafZn1 61 24.11 63 23.82 51 16.02 64 19.06 69 22.6

ASReml Tutorial: A1 Getting Started with ASReml – p. 24

Page 25: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Zinc.as file

Zinc concentration study

ASReml Tutorial: A1 Getting Started with ASReml – p. 25

Page 26: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Zinc.as file

Zinc concentration studySource * SeedZn LeafZn

cfSource SeedZn LeafZn1 61 24.11 63 23.82 51 16.02 64 19.06 69 22.6

ASReml Tutorial: A1 Getting Started with ASReml – p. 26

Page 27: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Zinc.as file

Zinc concentration studySource * SeedZn LeafZn

ZINC.DAT !Skip 1

ASReml Tutorial: A1 Getting Started with ASReml – p. 27

Page 28: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Zinc.as file

Zinc concentration studySource * SeedZn LeafZn

ZINC.DAT !Skip 1SeedZn ˜ mu Source

ASReml Tutorial: A1 Getting Started with ASReml – p. 28

Page 29: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Zinc.as file

Zinc concentration studySource * SeedZn LeafZn

ZINC.DAT !Skip 1SeedZn ˜ mu Source

Run the job from command prompt, Exploreror ConText."C:\Program Files\ASReml\bin\ASReml.exe" ZINC

ASReml Tutorial: A1 Getting Started with ASReml – p. 29

Page 30: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Automatic plot ofresiduals

Zinc concentration study Residuals vs Fitted values Residuals (Y)−10.00:14.00 Fitted values (X) 31.33: 83.67

ASReml Tutorial: A1 Getting Started with ASReml – p. 30

Page 31: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

View zinc.asr

ASReml 1.63i [07 Jan 2005] Zinc concentration

17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc

This Beta version is valid for 5 months

Please send comments to [email protected]

Licensed to: Arthur Gilmour

*********************************************

* SYNTAX change: A/B now means A A.B *

* *

* Contact [email protected] for support *

*************************************** ARG *

ASReml Tutorial: A1 Getting Started with ASReml – p. 31

Page 32: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Data summary

Folder: C:\data\Prosper\Armidale2005

QUALIFIERS: !SKIP 1

Reading ZINC.DAT FREE FORMAT skipping 1 lines

Univariate analysis of SeedZn

Using 39 records of 39 read

Model term Size #miss #zero MinNon0 Mean MaxNon0

1 Source 24 0 0 1 11.9487 24

2 SeedZn Variate 0 0 29.00 60.10 93.00

3 LeafZn 0 0 10.20 19.84 35.40

4 mu 1

ASReml Tutorial: A1 Getting Started with ASReml – p. 32

Page 33: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Iteration sequence

Forming 25 equations: 25 dense.

Initial updates will be shrunk by factor 0.316

NOTICE: 10 singularities detected.

1 LogL=-64.4770 S2= 44.160 24 df 1.000

2 LogL=-64.4770 S2= 44.160 24 df 1.000

Final parameter values 1.000

ASReml Tutorial: A1 Getting Started with ASReml – p. 33

Page 34: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Result summary

Degrees of Freedom and Stratum Variances

24.00 44.1597 1.0

Source Model terms Gamma Component Comp/SE % C

Variance 39 241.0000 44.1597 3.46 0 P

Analysis of Var NumDF DenDF F-incr Prob

4 mu 1 24.0 3190.25 <.001

1 Source 14 24.0 12.94 <.001

SLOPE for LOG(ABS(RES)) on LOG(PV) in Section 1

0.50

Finished: 17 Jan 2005 12:23:08 LogL Converged

ASReml Tutorial: A1 Getting Started with ASReml – p. 34

Page 35: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

What’s Next

Find the ZINC.DAT file,type up the ZINC.AS file and run it.Examine the output files zinc.asrzinc.res zinc.sln zinc.yht.

Four more introductory sessions:A2Overview: command line, data definitionA3files: the data fileA4model: model specificationA5exercises: some homework.

ASReml Tutorial: A1 Getting Started with ASReml – p. 35

Page 36: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

ASReml tutorial

A2 Running ASReml

Arthur Gilmour

ASReml Tutorial: A2 Running ASReml – p. 36

Page 37: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

A Structured .as file

First part defines the data

Second part defines the analysis

A minimal job has 4 lines

Many jobs have over 20 lines

File is built up in stages

ASReml Tutorial: A2 Running ASReml – p. 37

Page 38: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Definition part

[Job qualifiers] (command line options)

Job Title

Data Definition

[Pedigree and GIV Files]

Data file name and qualifiersZinc data analysisSource * SeedZn LeafZn

ZINC.DAT !SKIP 1

ASReml Tutorial: A2 Running ASReml – p. 38

Page 39: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Analysis part

[Analysis qualifiers]

[TABULATE]

Model lineSeedZn ˜ mu Source

[PREDICT]

[Variance structures]

[Component constraints]

ASReml Tutorial: A2 Running ASReml – p. 39

Page 40: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Job qualifiers

command line optionsASReml -<options> <jobname> <arguments>

command line not easily modified underWindows

First line of job

Recognised by ! character

!-<options> <arguments> or<qualifiers>

ASReml Tutorial: A2 Running ASReml – p. 40

Page 41: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Qualifier SYNTAX

First character is !

Three letters sufficient

separate from arguments with a space

Context specific

Examples!SKIP 1!CONTINUE !EPS !WORKSPACE 512

ASReml Tutorial: A2 Running ASReml – p. 41

Page 42: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Common Jobqualifiers

!CONTINUE – Use parameter estimates froma previous run as starting values

!FINAL – One more iteration

!LOGFILE – write .asl file

!DEBUG – extra output including timing

ASReml Tutorial: A2 Running ASReml – p. 42

Page 43: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Common Jobqualifiers

!EPS – graphics to .eps file

!HARDCOPY – do not write graphics to screen

!NOGRAPHICS – do not create graphics at all

!WORKSPACE 512 – use 512 Mb workspace

!RENAME r – rerun job with arguments

!ARG 1... – job arguments

ASReml Tutorial: A2 Running ASReml – p. 43

Page 44: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Job controlcontinued

P (Pinfile mode) must be specified from thecommand lineASReml -Pmyjob mypin

Command line options and argumentsoverride qualifiers and arguments on the jobcontrol line.

ASReml Tutorial: A2 Running ASReml – p. 44

Page 45: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Arguments

A way of resetting options within a job

Are inserted into the job where $n appears:$1 is replaced by the first argument$2 is replaced by the second argument

With !RENAME n, the first n arguments arebuilt into the output filename, and, the job isrun repeatedly after moving up anyarguments after the nthASReml -r2 job alpha beta gammaASReml -r2 job alpha betaASReml -r2 job alpha gammaASReml Tutorial: A2 Running ASReml – p. 45

Page 46: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Arguments continued

The command line options and qualifiers inASReml -r2 job alpha beta gammamay be given on the top line as!-r2 alpha beta gammaor as!rename !arg alpha beta gamma

ASReml Tutorial: A2 Running ASReml – p. 46

Page 47: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Exercise

Rerun the zinc example with!DEBUG !LOGFILE- look at the zinc.asl file!FINAL- see it does only one iteration!RENAME !ARG aaa- see output files are zincaaa.*!EPS !HARDCOPY- see no graphics displayed but zinc*.epsis produced

ASReml Tutorial: A2 Running ASReml – p. 47

Page 48: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

ASReml tutorial

A3 Data definition

Arthur Gilmour

ASReml Tutorial: A3 Data definition – p. 48

Page 49: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

A Structured .as file

First part defines the data

Second part defines the analysis

ASReml Tutorial: A3 Data definition – p. 49

Page 50: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Definition part

[Job qualifiers] (command line options)

Job Title

Data Definition

[Pedigree and GIV Files]

Data file name and qualifiersZinc data analysisSource * SeedZn LeafZn

ZINC.DAT !SKIP 1

ASReml Tutorial: A3 Data definition – p. 50

Page 51: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Qualifier SYNTAX

First character is !

Three letters sufficient

separate from arguments with a space

Context specific

ASReml Tutorial: A3 Data definition – p. 51

Page 52: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Title Line

identifies the job

must be present

must not contain any qualifier

ASReml Tutorial: A3 Data definition – p. 52

Page 53: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Comments

On all lines, characters following # arestripped out

Comment lines (a ! in column 1 followed by aspace) are copied to the output file.

Line length is 2000 characters

Reserved characters: #, !, $

ASReml Tutorial: A3 Data definition – p. 53

Page 54: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Data definition

Controls reading the data file and how thedata fields are used in the analysis.

definitions should appear in the order of thedata in the file

definition lines should be indented

transformations may alter the fields;the label will apply to the transformed field.

all data is held as real numbers.

ASReml Tutorial: A3 Data definition – p. 54

Page 55: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Basic definitions

label (co)variate

label * simple factor coded 1 2 ...

label !A [n] alphabeticly coded factor

label !I [n] numerically coded factor

label !G n group of n variates

label !P pedigree factor

label !L list simple factor; levels namedSEX !L male female 1 codes for male

ASReml Tutorial: A3 Data definition – p. 55

Page 56: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Zinc example

SeedZn is interpreted as a (co)variate

Source * generates 24 levels 1:2, 5:8,11:14, 17:19 21, 24

Source 24 generates 24 levels 1:2, 5:8,11:14, 17:19 21, 24

ASReml Tutorial: A3 Data definition – p. 56

Page 57: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Recoding levels

Source !I generates 15 levels labelled1:2, 5:8, 11:14, 17:19 21, 24

Source !A generates 15 levels labelled1:2, 5:8, 11:14, 17:19 21, 24

Specify an indication of how many levels areexpected after !I and !A if there are many(> 1000) levels

ASReml Tutorial: A3 Data definition – p. 57

Page 58: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Alpha qualifiers

!LL n – sets character length of alphabeticlabels

!SORT – puts labels in alphabetic/numericorder (current term)

!SORTALL – puts labels in alphabetic/numericorder (current and subsequent terms)

!SKIP s – to skip s fields

ASReml Tutorial: A3 Data definition – p. 58

Page 59: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Transformations

ASReml can transform the data as it is readin.

applied in order of definition.

record vector has 1000 cells

have a elemental syntax based on qualifiers

yield !*100

ASReml Tutorial: A3 Data definition – p. 59

Page 60: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Arithmetic operators

!+o !-o !*o !/o !ˆp

o is a number, Vc or f where c is a cellposition number, f is the name of an earliercolumn.

Palive !/Total # change count toproportion

ASReml Tutorial: A3 Data definition – p. 60

Page 61: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Missing valueoperators

!D v – discards records with MV or v incurrent field

!M v – converts values of v to missing valuesin current field

!NA v – converts missing values to the valuev

ASReml Tutorial: A3 Data definition – p. 61

Page 62: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Exercise

Modify the zinc job to calculate the ratio ofSeedZn to LeafZn

Modify the declaration for Source to use !I

Review the information on transformations inthe help file.

ASReml Tutorial: A3 Data definition – p. 62

Page 63: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

ASReml tutorial

A4 Pedigree, giv and data files

Arthur Gilmour

ASReml Tutorial: A4 Pedigree, giv and data files – p. 63

Page 64: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Pedigree file

Expected if !P data qualifier specified

contains ID SIREID DAMID

in birth order (parents before progeny (see!SORT))

!ALPHA !SKIP k !DIAG !GIV !INBRED !MGS!REPEAT !SELF !SORT

e.g.mydata.ped !skip 1 !diag

ASReml Tutorial: A4 Pedigree, giv and data files – p. 64

Page 65: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

GIV files

Generalized InVerse

Has file extension .giv ( .grm if not inverted)

Lower triangle rowwise sparse formatrow column value

!SKIP s

ASReml Tutorial: A4 Pedigree, giv and data files – p. 65

Page 66: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

DataFile Line

names the data file (enclosed in quotes ifembedded blanks)

Data file is typically an ASCII fileTAB, SPACE or COMMA separatede.g. save from Excel as comma separated

Missing values: *, . and NA and empty fieldsin .csv file are taken as missing

!SKIP s !FILTER f !SELECT v !SUMMARY

zinc.dat !skip 1 !SUM

ASReml Tutorial: A4 Pedigree, giv and data files – p. 66

Page 67: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

DataFile LineQualifiers

Some 40 qualifiers are defined for this line orto immediately follow this line.!MAXIT m !EPS !CONTINUE!X x !Y y !JOIN !G g

!CONTRAST t f coefficients!PVAL f points!SPLINE t points

ASReml Tutorial: A4 Pedigree, giv and data files – p. 67

Page 68: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

TABULATE directiveRaw tables of means

y ˜ factors

Qualifiers!COUNT – numbers in each cell!SD – Standard deviation in each cell!RANGE – of values in each cell!STATS – same as !COUNT !RANGE !SD

before model (or after) model line

TABULATE Leaf Seed ˜ Source !STATS

Multiple statements allowedASReml Tutorial: A4 Pedigree, giv and data files – p. 68

Page 69: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Data exercises

Add !SUM qualifier to the data line; explorezinc.ass

Insert two plotting lines and view graphs!X SeedZn !Y SeedZn!X SeedZn !Y SeedZn !G Source

Insert Tabulate line and view zinc.tab fileTABULATE SeedZn LeafZn ˜ Source !STATS

ASReml Tutorial: A4 Pedigree, giv and data files – p. 69

Page 70: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

ASReml tutorial

A5 Model line

Arthur Gilmour

ASReml Tutorial: A5 Model line – p. 70

Page 71: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Model line

Univariatey ˜ <fixed dense>,

!r <random sparse>,!f <fixed sparse>

y is response variable<fixed dense> terms appear in ANOVA table<random sparse> and <fixed sparse> arereordered to maximize sparsity duringsolution.

ASReml Tutorial: A5 Model line – p. 71

Page 72: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Model terms

Reserved termsmu – constant termmv – missing value estimatesunits – extra residual

Data terms e.g. A B X Sex Treatment

Functions of termsat(Group,1) spl(X,10) fac(X)log(X,1) forms log(X+1)

ASReml Tutorial: A5 Model line – p. 72

Page 73: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Model termscontinued

CombinationsA.B Sex.spl(X,5) at(site,3,5).row

ShorthandA*B – A B A.BA/B – A A.B

Continuation of a model line is indicated by atrailing comma

ASReml Tutorial: A5 Model line – p. 73

Page 74: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Random terms

May be followed by an initial value for thevariance component and a qualifier.

Default initial value is 0.1

blocks 0.2 !GU!GP – force positive (default)!GU – unrestricted!GF – fixed

ASReml Tutorial: A5 Model line – p. 74

Page 75: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

PREDICT

Multiple predict statementspredict A

More details later

Variance structure lines

See later

ASReml Tutorial: A5 Model line – p. 75

Page 76: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Order of processing

Read .as file down to model

Read data file

Produce data summaries

Do Plots and tabulations

Read Variance structure lines

Fit model

Report results

ASReml Tutorial: A5 Model line – p. 76

Page 77: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

GIGO

Check ASReml has read the data correctly1. Number of records read/retained2. Mean and range of variables3. Distribution of data

!SUM summary!X !Y plotTABULATE

ASReml Tutorial: A5 Model line – p. 77

Page 78: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

ASReml tutorial

A6 Exercises

Arthur Gilmour

ASReml Tutorial: A6 Exercises – p. 78

Page 79: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Zinc data

Use !SUM to explore data structure

Define Source using !I

Use !X !Y to plot SeedZn vs LeafZn

Use sqrt() to transform to Square roots

Fit Leaf ˜ mu Seed !r Source

ASReml Tutorial: A6 Exercises – p. 79

Page 80: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Explore the onlinehelp

ASReml.chm

ASReml Tutorial: A6 Exercises – p. 80

Page 81: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Volts data

User Guide 15.3

Identify outliers - assess effect of droppingtwo.

ASReml Tutorial: A6 Exercises – p. 81

Page 82: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Oats data

User Guide 15.1

Split Plot design: Blocks|Variety|Nitrogen

Use !CONTRAST to test for linear N trend

ASReml Tutorial: A6 Exercises – p. 82

Page 83: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Rats data

User Guide 15.2

ASReml Tutorial: A6 Exercises – p. 83

Page 84: ASReml · 17 Jan 2005 12:23:06.591 32.00 Mbyte Windows zinc This Beta version is valid for 5 months Please send comments to asreml@VSN-intl.co.uk Licensed to: Arthur Gilmour *****

Own data

Prepare job to read and summarize the data

ASReml Tutorial: A6 Exercises – p. 84