BookmarkSubscribeRSS Feed
graingerad12
Calcite | Level 5

Hello! I was just wondering if someone could please help me with a problem. I am trying to use OLS to estimate a linear hedonic wage equation with wages as a function of gender, race, age, age^2, and fatality risks. 

 

the variables are defined as:

 

wage = worker's hourly wage rate

male = 1 if worker is male and =0 otherwise

white = 1 if worker's race is white = 0 otherwise

age = workers age in years

fatrate = worker's risk of fatality measured in terms of deaths per 100,000 workers. 

 

how would the code even look like? Do i need to create a matrix, and if so, how? 

thank you!

4 REPLIES 4
Reeza
Super User

Look at proc REG or GLM. 

 

The documentation has good examples. 

 

You do not need to create a matrix, a SAS dataset is enough to get started. 

 

http://www.ats.ucla.edu/stat/sas/webbooks/reg/chapter1/sasreg1.htm

pearsoninst
Pyrite | Level 9
I see there are Binary Variables and OLS mainly used in LR model (as per i know ) You can check Logistic regression i you wish to ..
PGStats
Opal | Level 21

Hedonic function depends on fatrate... Hmmm

PG
Reeza
Super User

Since dependent variable is continuous you can use regression.

 

proc reg data=have;

model wage = male white age fatrate;

run;quit;

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1666 views
  • 0 likes
  • 4 in conversation