## cross country analysis of different years?

Solved
Occasional Contributor
Posts: 14

# cross country analysis of different years?

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

Accepted Solutions
Solution
‎05-22-2012 08:30 AM
Posts: 2,655

## Re: cross country analysis of different years?

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

All Replies
Solution
‎05-22-2012 08:30 AM
Posts: 2,655

## Re: cross country analysis of different years?

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

🔒 This topic is solved and locked.