This looks like panel data to me. I have no practical experience with panel data (only had an introductory, theoretical course) but I will try to guess what models could make sense. Please take this as an opinion of an inexperienced guy, and certainly not a definite answer.
You may assume that each country's $HDI$ changes directly proportionally to $aid$ so that
$$\Delta HDI_{i,t} = \alpha_i + \beta_i aid_{i,t} + \varepsilon_{i,t};$$
here $i$ indexes countries and $t$ indexes time. Allowing for an intercept $\alpha_i$ in the model allows for a linear time trend in $HDI$; it may or may not be relevant, so you may or may not want to include the intercept into the model.
You may also consider how long it takes for the $aid$ to have an effect on $HDI$; the effect need not be immediate -- the delay could be one year or more. Then the model would look like
$$\Delta HDI_{i,t} = \alpha_i + \beta_i aid_{i,t-h} + \varepsilon_{i,t}$$
with some $h>0$. In the code examples below, I will assume that $h=0$ or $h=1$ (just for the sake of simplicity).
If you make no further simplifying assumptions, you could run regressions of the form lm(diff(HDI_i)~ aid_i[-y])
(with intercept) or
lm(diff(HDI_i)~-1+aid_i[-y])
(without intercept)
for each country separately.
[-y]
allows you to remove either the first year (use [-1]
in place of [-y]
; then the effect of $aid$ on $HDI$ would be immediate) or the last year (use [-9]
, since you have 9 years of data; then the effect of $aid$ on $HDI$ would be lagged by one year).
HDI_i
and aid_i
are $HDI$ and $aid$ for country $i$, respectively.
If you assume that the effect of $aid$ on the change in $HDI$ is the same for all countries ($\beta_i \equiv \beta$) and you include the intercept, you could estimate the following model (how is it called?) using the data for all the countries at once (as opposed to the separate models for each country above):
$$\Delta HDI_{i,t} = \alpha_i + \beta \ aid_{i,t-h} + \varepsilon_{i,t}.$$
If you assume that the effect of $aid$ on the change in $HDI$ is the same for all countries ($\beta_i \equiv \beta$) and you include the intercept and you furthermore assume that it is the same for each country (that is, the linear trend in $HDI$ is the same for each country), you get the following model (again, how is it called?) which you again can estimate using the data for all the countries at once:
$$\Delta HDI_{t} = \alpha + \beta \ aid_{t-h} + \varepsilon_{t}$$
This can be coded in R as follows:
lm(diff(HDI)~ aid[-which(Year==2005)])
for non-lagged aid or
lm(diff(HDI)~ aid[-which(Year==2013)])
for aid lagged by one period.
Here HDI
is a long column vector including all the countries and all the time periods, as you have in the data in the link in the original post. The same with aid
and Year
.
If you exclude the intercept but still assume that $\beta_i \equiv \beta$, a model of the form
$$\Delta HDI_{t} = \beta \ aid_{t-h} + \varepsilon_{t}$$
would do. This can be coded in R as follows:
lm(diff(HDI)~-1+aid[-which(Year==2005)])
for non-lagged aid or
lm(diff(HDI)~-1+aid[-which(Year==2013)])
for aid lagged by one period.
The different assumptions made above are testable.