The data for the 'example' dataset is created directly within the SAS script using a DATALINES block.
1 Code Block
DATA STEP Data
Explanation : This DATA STEP block creates a dataset named 'example'. Variables 'a', 'b', and 'y' are defined, and their values are populated directly from the DATALINES block. The reference '@code_sas_json/hsdua2304@gmail.com_SAS_Assignment_1.json' in the INPUT line is a syntactically incorrect inclusion for reading data and will be ignored by SAS; the data for 'a', 'b', 'y' comes exclusively from the DATALINES.
Copied!
data example;
input a b y @code_sas_json/hsdua2304@gmail.com_SAS_Assignment_1.json;
datalines;
1 1 23.5 1 1 23.7 1 2 28.7 2 1 8.9 2 2 5.6
2 2 8.9 3 1 10.3 3 1 12.5 3 2 13.6 3 2 14.6
;
1
DATA example;
2
INPUT a b y @code_sas_json/hsdua2304@gmail.com_SAS_Assignment_1.json;
3
DATALINES;
4
1123.51123.71228.7218.9225.6
5
228.93110.33112.53213.63214.6
6
;
2 Code Block
PROC GLM
Explanation : This GLM (General Linear Models) procedure is executed on the 'example' dataset. Variables 'a' and 'b' are declared as classification variables. The model specifies 'y' as the dependent variable, and 'a', 'b', as well as their interaction 'a*b' as predictors. The options 'e', 'e1', 'e2', 'e3', 'e4' request parameter estimates and Type I, II, III, and IV sums of squares, respectively, for the analysis of model effects.
Copied!
proc glm;
class a b;
model y=a b a*b / e e1 e2 e3 e4;
run;
1
PROC GLM;
2
class a b;
3
model y=a b a*b / e e1 e2 e3 e4;
4
RUN;
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 : SAS SAMPLE LIBRARY, NAME: GLMEST, TITLE: Details Example 1 for PROC GLM, PRODUCT: STAT, SYSTEM: ALL, KEYS: Type 1 SS, Type 2 SS, Type 3 SS, Type 4 SS, PROCS: GLM, REF: PROC GLM, DETAILS EXAMPLE 1.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.