BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Dan_yu_W
Obsidian | Level 7

Hello.

I was asked from my employer wether it is possible to make a regression from a cross country survey dataset collected over several years (see example):

Example:

HappinessIncomeCountryYear
8100.000Sweden2001
7150.000Sweden2003
490.000Poland2001
480.000Poland2003
5120.000GB2001
6120.000GB2001
5110.000GB2003

The model is: Happiness = Income * X

But I want to take the country of the survey and the year the survey was performed into consideration. Do I have to make some country and year dummies and the inteaction dummy (between income, country and year)? Do SAS have a procedure for this kind of analysis?

Thanks for the help

1 ACCEPTED SOLUTION

Accepted Solutions
SteveDenham
Jade | Level 19

I would try PROC GLIMMIX.  It appears that you have an ordinal multinomial response, one continuous variable, one classification variable (country), and one variable that is going to cause problems (year).  I don't think year has the same meaning in each country, and in some sense, it is a repeated measurement on the country.

Something like this (untested) might be a good start:

proc glimmix data=yourdata;

class country year;

model happiness= income country income*country/dist=mult link=clogit;

random year/subject=country residual type=un;

run;

Options for odds ratios could be added.  Example 40.13 in the GLIMMIX documentation may help as well.

Steve Denham

View solution in original post

1 REPLY 1
SteveDenham
Jade | Level 19

I would try PROC GLIMMIX.  It appears that you have an ordinal multinomial response, one continuous variable, one classification variable (country), and one variable that is going to cause problems (year).  I don't think year has the same meaning in each country, and in some sense, it is a repeated measurement on the country.

Something like this (untested) might be a good start:

proc glimmix data=yourdata;

class country year;

model happiness= income country income*country/dist=mult link=clogit;

random year/subject=country residual type=un;

run;

Options for odds ratios could be added.  Example 40.13 in the GLIMMIX documentation may help as well.

Steve Denham

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 1 reply
  • 1228 views
  • 0 likes
  • 2 in conversation