A linear model has the following characteristics:
✑ A dependent variable (y)
✑ Three continuous predictor variables (x1-x3)
✑ One categorical predictor variable (c1 with 3 levels)
Which SAS program fits this model?
A linear model has the following characteristics:
✑ A dependent variable (y)
✑ Three continuous predictor variables (x1-x3)
✑ One categorical predictor variable (c1 with 3 levels)
Which SAS program fits this model?
To fit a model in SAS with both continuous and categorical predictor variables, you should use the PROC GLM procedure. PROC GLM can handle class (categorical) variables, which is necessary in the provided context because one of the predictor variables is categorical with three levels. PROC REG does not support the CLASS statement, which is required for the categorical variable. Therefore, the correct option is the one that uses PROC GLM and includes the CLASS statement for the categorical predictor variable. Option D effectively fits the given model in SAS.
For those of you wondering- "PROC REG" does not support "CLASS" which is why you cannot use it.
Reg also does not support VAR, SOLUTION
It does support VAR, just not solution. https://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.3&docsetId=statug&docsetTarget=statug_reg_syntax.htm&locale=en
How come the answer is D here?