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:
Happiness | Income | Country | Year |
---|---|---|---|
8 | 100.000 | Sweden | 2001 |
7 | 150.000 | Sweden | 2003 |
4 | 90.000 | Poland | 2001 |
4 | 80.000 | Poland | 2003 |
5 | 120.000 | GB | 2001 |
6 | 120.000 | GB | 2001 |
5 | 110.000 | GB | 2003 |
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
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
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
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.