Desktop productivity for business analysts and programmers

OLS regression SAS

Reply
Contributor
Posts: 46

OLS regression SAS

Folks,

 

I'm new to regression analysis in SAS. Before I would have done all my economteric modelling using Stata.

 

I would like to run an OLS regression model where my independent variables are both continous and categorical.

 

My model is;

depen = age agesq sex pes region

 

where age and agesq are continous variables and region pes and sex are catergorical 

I provide a sample of my data for ease of interpreation.

 

Any help is most welcome on how to run a model with two different types of variables 

 

 

regionagePESSexDepenagesq
76011-0.00811120
72732-0.0020554
55831-0.00786116
748310.02210896
743320.08924386
13932.78
123320.16181846
117110.17099134
755110.002723110
161210.00234122
74121-0.0021882
245210.02071890
340210.03278580
33021.60
73112-0.0082662
448120.08927296
421210.09714942
34811-0.0208296
32212-0.0101944
318220.01882936
436220.02278572
239210.01014778
43611-0.073372
23312-0.0003166
43312-0.0006966
Regular Contributor
Posts: 228

Re: OLS regression SAS

Posted in reply to Sean_OConnor

This will be helpful Introduction to Regression Procedures

Either proc reg or proc glm will do but dummy variables of your categorical variables are to be used in proc reg unlike proc glm where you just specify your categorical variables in the class statement.

And proc reg has more regression model diagnostics features.

PROC Star
Posts: 7,537

Re: OLS regression SAS

Posted in reply to Sean_OConnor

@wong already provided your two choices and the differences between them. However, you will first want to correct your agesq variable as it is currently 2*age rather than age**2

 

Art, CEO, AnalystFinder.com

 

Trusted Advisor
Posts: 1,240

Re: OLS regression SAS

[ Edited ]
Posted in reply to Sean_OConnor

Hi,

 

Also, why are you including 2*age as a predeictor in the model. This will introduce multicollinearity in the model resutling non unique solutions.

Ask a Question
Discussion stats
  • 3 replies
  • 132 views
  • 0 likes
  • 4 in conversation