BookmarkSubscribeRSS Feed
Mathis1
Quartz | Level 8

Hello, 

I don't really see the difference between those two statements :

 

proc reg data=Have;

model y= x1-x4;

run;

 

and 

 

proc reg data=Have;

model y= x1 x2 x3 x4;

run;

 

Any answer ?

 

Thanks 🙂

6 REPLIES 6
Mathis1
Quartz | Level 8

I stumbled upon a multiple choice question on the internet.

Question is :

Identify the correct sas program for fitting a MLR model with dependent variable y and four predictor variables (x1-x4)/ 

 

The propositions are  :

Capture.PNG

 

 

I don't quite see why answer D is not a correct answer as well as A.

 

 

PaigeMiller
Diamond | Level 26

You could have run the code yourself and found out that D doesn't work. Or looked in the documentation.

 

A is not wrong, it should give the same answers as B, but unnecessary to use a VAR statement in this situation.

--
Paige Miller
PGStats
Opal | Level 21

To add to @PaigeMiller explanation, all variables named in the MODEL statement of proc REG are assumed to be numeric. The VAR statement, so often required in other procedures to distinguish numeric from categorical, isn't required. But proc reg can be used to fit many models interactively, it will compute results after every MODEL statement, not knowing yet if more models are to come. The VAR statement tells the procedure about all the variables that you may consider further along in your models. Knowing that, the procedure only needs to read your data once to accumulate all the required sums of crossproducts.

PG
PaigeMiller
Diamond | Level 26

What differences do you see?

--
Paige Miller

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 780 views
  • 5 likes
  • 4 in conversation