Published on :
Statistique CREATION_INTERNE

Examination of pig growth rate

This code is also available in: Deutsch Español Français
Awaiting validation
The script begins by defining a title for the output report: 'Examination of pig growth rate'. It then proceeds to create a dataset named 'Pigs' using a DATA step and the DATALINES clause. This dataset contains observations for the variables 'Group', 'Block', 'Treatment', and 'Weight'. Finally, the script executes the PROC LATTICE procedure on the 'Pigs' dataset, specifying the 'Weight' variable for analysis, which is typical for analyzing lattice experimental designs.
Data Analysis

Type : CREATION_INTERNE


The 'Pigs' dataset is created directly within the SAS script using a DATA step and the DATALINES clause, providing integrated raw data on pig growth.

1 Code Block
DATA STEP Data
Explanation :
This DATA step creates a dataset named 'Pigs' and populates it with raw data provided via the DATALINES clause. The defined variables are 'Group', 'Block', 'Treatment', and 'Weight', representing experimental measurements for pigs.
Copied!
1DATA Pigs;
2 INPUT Group Block Treatment Weight ;
3 DATALINES;
41 1 1 2.20 1 1 2 1.84 1 1 3 2.18 1 2 4 2.05 1 2 5 0.85
51 2 6 1.86 1 3 7 0.73 1 3 8 1.60 1 3 9 1.76
62 1 1 1.19 2 1 4 1.20 2 1 7 1.15 2 2 2 2.26 2 2 5 1.07
72 2 8 1.45 2 3 3 2.12 2 3 6 2.03 2 3 9 1.63
83 1 1 1.81 3 1 5 1.16 3 1 9 1.11 3 2 2 1.76 3 2 6 2.16
93 2 7 1.80 3 3 3 1.71 3 3 4 1.57 3 3 8 1.13
104 1 1 1.77 4 1 6 1.57 4 1 8 1.43 4 2 2 1.50 4 2 4 1.60
114 2 9 1.42 4 3 3 2.04 4 3 5 0.93 4 3 7 1.78
12;
2 Code Block
PROC LATTICE
Explanation :
This procedure executes a lattice analysis on the 'Pigs' dataset. The 'var Weight;' statement specifies that the 'Weight' variable is the dependent variable to be analyzed within this experimental design.
Copied!
1PROC LATTICE DATA=Pigs;
2 var Weight;
3RUN;
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.
Copyright Info : S A S S A M P L E L I B R A R Y