Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one...

49
Use of Computers in Biometrics

Transcript of Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one...

Page 1: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’

Use of Computers in Biometrics

Page 2: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’
Page 3: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’
Page 4: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’
Page 5: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’
Page 6: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’
Page 7: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’

GermplasmInternational Plant Genetic Resources Institute (IPGRI)International Potato Center (CIP).International Center for maize and Wheat Improvement (CIMMYT).International Rice Research Institute (IRRI).International Crops research Institute for the Semi-Arid Tropics (ICRISTAT).

Page 8: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’

Plant Introduction StationsNorthern RPIS, Geneva, New York:

Perennial clover, onion, pea, broccoli, timothy.

Southern RPIS, Georgia:Cantaloupe, cowpea, millet, peanut, sorghum, pepper

North Central RPIS, Ames, Iowa:Alfalfa, corn, sweet clover, beets, cucumber, tomato.

Page 9: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’

Plant Introduction StationsWestern RPIS, Pullman, Washington:

Bean, cabbage, fescue, wheat, grasses, lentil, lettuce, safflower, chickpea

State and federal Potato Introduction Station, Wisconsin:

Potato

Page 10: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’

Information

Germplasm Information Resources Network

(GRIN)

Page 11: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’

Experimental Design

Page 12: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’

Clerical OperationsDesigning and printing field plans and plot plans.Label printing ~ Planting; harvest; seed inventory and storage.Score books.Data summaries, tables.Keeping track of where things are and what has been done to what lines.

Page 13: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’
Page 14: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’
Page 15: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’
Page 16: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’
Page 17: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’
Page 18: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’

Data Management

Collect data in suitable computer form.◦ Pencil & paper.◦ Handheld data logger.◦ Direct from analog/digital device.Validate data, check for errors.Sort data into suitable order for analyses, including transformation.

Page 19: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’
Page 20: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’
Page 21: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’

Data Storage

Database Management Systems.Spreadsheet.Data types.◦Alpha/numeric characters.◦Numerical data.

Page 22: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’

Data Analyses and Interpretation

Missing values.Analyze subset of total number of replicates.Handle data transformation.Derive variables.

Page 23: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’

Data Analyses and Interpretation

Analyze data from each character and location.Analyze multiple characters and sites.Interpretation: ◦ histograms; scatter diagrams; data

tables, correlation, regression, multivariate transformations.

Page 24: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’

Other Considerations

User FriendlyConsultation with a statistician

Page 25: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’

Commonly use Software

Experimental Design & Analyses.◦MSTAT, MiniTab, SAS, GENSTATSpreadsheets and data bases.◦ Excell, Lotus 1-2-3, DBase IIIGraphics.◦ PowerPoint, Harvard Graphics, + many

others

Page 26: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’

Introduction to SAS

SAS is comparable to a high level computer language.◦Specific statements to manipulate

and analyses data.Operates on a “batch” system, designed for punch cards.

Page 27: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’

Produces:◦ SAS LOG with messages about the

execution of the batch program.◦ SAS LIST with specified output.PC SAS has “windows”◦ Program editor window (in place of

punch cards).◦ LOG window.◦ OUTPUT window.

Introduction to SAS

Page 28: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’

SAS statements◦ Always use a semi-colon after each

SAS statement;◦ Can have more than one statement

per line;◦Wrap statements into additional

lines;◦ Comment lines start with asterisk;

Introduction to SAS

Page 29: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’

DATA step

;

PROC step

;

RUN;

Introduction to SAS

Page 30: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’

File managementData sets can be named:

i.e. DATA newdata;Can be accessed several times in one SAS session if named.Lost when exit SAS.

Permanent data sets called SAS Libraries are not lost on exit, but must be set up in advance.

Introduction to SAS

Page 31: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’

File management;Combine SAS statements and data in one file.Have SAS statements in one file and data in another (ASCII) file.

INFILE ‘jackdata.dat’Simplest to have one line of data per experimental unit and enter data in parallel.

Introduction to SAS

Page 32: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’

DATA step• data statement DATA name;

• program statements.setup options;

page size, page numbers, etc.;assign variable names;add titles to output;

Introduction to SAS

Page 33: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’

DATA step;

• read data into SAS file;

• perform math functions;= + - * / **

• conditional statementsIF rep = 4 THEN DELETE;

• discard variables from data set;

Introduction to SAS

Page 34: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’

Variables and variable names;Character variables indicated by a $ symbol.

i.e. INPUT variety $ rep yield;Characters data is case sensitive.JACK # jack;

Variable names limit to 8 characters for output.

Introduction to SAS

Page 35: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’

PROCedure step;◦ Output selected data for printing.◦ Summarize data.◦ Perform statistical analyses.

Introduction to SAS

Page 36: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’

Common PROC’sMEAN; STAND; SUMM;

TABUL; UNIVAR; PLOT;

ANOVA; GLM; ORTH;

NLIN; REG; STEPW;

CORR; CLUST; PRINCE;

Introduction to SAS

Page 37: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’

Univariate analysisDATA numbers;

Title “Univariate Procedure Example”;

INPUT yield;

CARDS;

10.2 14.6 17.9 9.23 21.6 …;

PROC UNIVARIATE;

RUN;

Page 38: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’

RCB Analysis of VarianceDATA;

INPUT variety $ rep nitrogen yield;

CARDS;

Ericka 1 1 24.5

Ericka 2 2 26.3

Ericka 3 3 30.7

.

Ceres 4 3 29.5

Page 39: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’

RCB Analysis of Variance

: :

PROC ANOVA;

CLASSES rep variety nitrogen;

MODEL yield = rep variety nitrogen variety*nitrogen;

MEANS variety nitrogen /LSD;

RUN;

Page 40: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’

RCB Analysis of VarianceDATA;

INPUT variety $ rep nitrogen yield; CARDS;

Ericka 1 1 24.5

Ericka 2 2 26.3

Ericka 3 3 30.7

. . . . . .

Ceres 4 3 29.5

PROC ANOVA;

CLASSES rep variety nitrogen;

MODEL yield = rep variety nitrogen variety*nitrogen;

MEANS variety nitrogen /LSD;

RUN;

Page 41: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’

Need Help?◦Help Icon.◦SAS Manual◦SAS/ASSIST icon.◦Friendly Technicians.◦Ag. Stats. Program

(Bill Pyle).

Introduction to SAS

Page 42: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’
Page 43: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’
Page 44: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’
Page 45: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’
Page 46: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’
Page 47: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’
Page 48: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’
Page 49: Use of Computers in Biometrics - University of Idaho · 9Combine SAS statements and data in one file. 9Have SAS statements in one file and data in another (ASCII) file. xINFILE ‘jackdata.dat’

Experimental Design