Lecture 17 Model Development and Selection of Variables

Lecture 17 Model Development and Selection of Variables - I...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: I OWA S TATE U NIVERSITY Department of Animal Science I OWA S TATE U NIVERSITY Department of Animal Science Model Development and Selection of Variables Animal Science 500 Lecture No. 17 October 28, 2010 I OWA S TATE U NIVERSITY Department of Animal Science Using PROC COMPARE PROC COMPARE compares two SAS datasets with each other. It warns you if it detects observations (rows) or variables (columns) that do not agree across the two datasets. When there are no disagreements, you can be confident that data entry is reliable. To use PROC COMPARE, enter your data twice, once each into two separate raw data files. Next use the two raw data files to create two SAS data sets. Then use PROC COMPARE. I OWA S TATE U NIVERSITY Department of Animal Science Using PROC COMPARE Example: The following example compares the two SAS data sets named PIG1 and PIG12. PROC COMPARE BASE = PIG1 COMPARE = PIG12 ERROR ; ID subjctid ; The BASE keyword defines the data set that SAS will use as a basis for comparison. The keyword COMPARE defines the dataset which SAS will compare with the base dataset. The ERROR keyword requests that SAS print an error message to the SASLOG file if it discovers any differences when it compares the two data sets. I OWA S TATE U NIVERSITY Department of Animal Science Using PROC COMPARE The ID statement tells SAS to compare rows (observations) in the data set by the identifying variable, which here is named SUBJCTID. This variable must have a unique value for each case. PROC COMPARE features a number of options, many of which are designed to control the amount and type of information displayed in the listing file. I OWA S TATE U NIVERSITY Department of Animal Science Class Statement Variables included in the CLASS statement referred to as class variables. Specifies the variables whose values define the subgroup combinations for the analysis. Represent various level of some factors or effects Treatment (1,.n) Season (spring, summer, fall, and winter coded 1 through 4) Breed Color Sex Line Day Laboratory I OWA S TATE U NIVERSITY Department of Animal Science Class Variables Are usually things you would like to account for in your model Can be numeric or character Can be continuous values They are generally not used in regression analyses What meaning would they have I OWA S TATE U NIVERSITY Department of Animal Science Class Statement Options Ascending sorts class variable in ascending order Descending sorts class variable in descending order Other options with the Class statement generally related to the procedure (PROC) being used and thus will not cover them all I OWA S TATE U NIVERSITY...
View Full Document

Page1 / 25

Lecture 17 Model Development and Selection of Variables - I...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online