0
$\begingroup$

I am currently working with Covid-19 key figures such as registered cases of infection and death. My data is a panel dataset across time and municipalities in Denmark, the set consists of several socioeconomic indicators and indices that represent the magnitude of government response to Covid-19.

I want to model how these socioeconomic indicators affect the spread rate of Covid-19 and especially the how the government response indices affect it, so my question is how I am going to represent my dependent variable to get the best results along side being interpretable.

One paper suggests that I use $$Growth.Rate_{i,t}=\frac{Cumulative.Case_t-Cumulative.Case_{t-1}}{Population_i}, $$ where $i$ denotes municipality. My supervisor suggest that I model it like log-returns of an asset such that $$Growth.Rate_{i,t}=\ln\left(\frac{Cumulative.Case_t}{Population_i}\right)-\ln\left(\frac{Cumulative.Case_{t-1}}{Population_i}\right)$$

The problem with the second one is the pandemic does not hit every municipality at the same time, so I have a lot of $0$'s in these cases that cannot be log transformed. Do I then delete these rows, and simply delete a lot of data, or put NA even though I know the rate of change is zero?

$\endgroup$

2 Answers 2

0
$\begingroup$

Different interpretation of relative in the paper

One paper suggests that I use $$Growth.Rate_{i,t}=\frac{Cumulative.Case_t-Cumulative.Case_{t-1}}{Population_i}, $$

Rate relates to relative growth. In the case of this paper you indeed have some sort of relative growth. It is the change in cases per amount of population.

However it is entirely different from the change in cases per amount of cases.

$$Growth.Rate_{i,t}=\frac{Cumulative.Case_t-Cumulative.Case_{t-1}}{(0.5 \cdot Cumulative.Case_t+ 0.5 \cdot Cumulative.Case_{t-1})}, $$

This value is more typical as interpretation of growth rate.


Relative change equals the change in the logarithm

The formula of your supervisor stems from the following.

$$\frac{d x}{x} = d \ln(x)$$

So you get approximately that

$$\frac{\Delta Cumulative.Case_t}{Cumulative.Case_t} \approx \Delta \ln Cumulative.Case_t$$

The relative change equals the change in the logarithm. Note that you do not need to know the Population_i if this is constant

$$\ln\left(\frac{Cumulative.Case_t}{Population_i}\right)-\ln\left(\frac{Cumulative.Case_{t-1}}{Population_i}\right) = \ln\left({Cumulative.Case_t}\right)-\ln\left({Cumulative.Case_{t-1}}\right)$$


Dealing with zero's

  • You could use larger step sizes between times $t$ and $t+1$ in order to make sure that there is enough change in cases.

  • You could model/fit the function of $Cumulative Case(t)$ more directly instead of the function of the difference. If the growth rate is some function $R(t)$ then the cumulative cases will be an exponential function

    $$C(t) = C(0) \cdot e^{\int_0^t R(s) ds}$$

  • The zero's are only a problem for some small values of $t$. When you reach the point where $C(t)>1$ then the values remain non-zero for larger values of $t$ as well. So you can choose to model only the part where $C(t)$ is non-zero.

$\endgroup$
3
  • $\begingroup$ Thank you for taking your time to give such an elaborate answer. Regarding the second point in dealing with zero's, do you suggest modeling the log(C(t)) to circumvent the issue with municipalities having different population sizes? $\endgroup$ Commented Mar 10, 2022 at 10:09
  • $\begingroup$ @Jens the other way around, model $C(t)$ instead of $\log C(t)$. $\endgroup$ Commented Mar 10, 2022 at 11:00
  • $\begingroup$ So in that case I would use the population size as an individual predictor to account for the size difference in each municipality I presume? $\endgroup$ Commented Mar 10, 2022 at 12:43
0
$\begingroup$

The simple work-around for the log transformed rates is to add a small edge of correction $\epsilon$:

$$ \text{Growth Rate}_{i,t} =\ln\left(\frac{Cumulative.Case_t}{Population_i} + \epsilon\right) -\ln\left(\frac{Cumulative.Case_{t-1}}{Population_i} + \epsilon\right) \\ \epsilon = .0001 $$

$\endgroup$
6
  • 1
    $\begingroup$ This isn't simple at all. The limits of either term are $\ln 0.0001$ and $\ln 1.0001$ (presumably) and zeros in the original data are all too likely to imply massive negative outliers. The fallacy here is that because $\ln (y + \epsilon)$ is very close to $\ln y$ for large $y$ that it is a good approximation generally, but that is not true for $y$ near zero. What to do instead is a larger question, but sympercents can help, and adding much larger constants, e.g. 0.5, is a better idea. $\endgroup$
    – Nick Cox
    Commented Mar 9, 2022 at 15:02
  • $\begingroup$ This would be true if OP was using $ln(y + \epsilon)$ as their dependant variable, but don't the ε cancel out when they're calculating $ln(y_t + \epsilon) - ln(y_{t-1} + \epsilon)$? $\endgroup$
    – Eoin
    Commented Mar 9, 2022 at 15:31
  • $\begingroup$ I fully agree that working with the logs might not be the best option overall here. $\endgroup$
    – Eoin
    Commented Mar 9, 2022 at 15:32
  • $\begingroup$ They cancel out if the $y$ are equal but really not otherwise if one value is zero, Naturally the whole idea of quantifying change from zero is problematic, but it's not fixed this way. $\endgroup$
    – Nick Cox
    Commented Mar 9, 2022 at 15:44
  • $\begingroup$ Thank you for the answer, I have read the comments as well. I am not too fond of the idea of adding values to the data to circumvent the problem, I have read several places that it changes the intercept and as some of my values of interest are in fact constant across municipality I guess it can alter the interpretability of the result. $\endgroup$ Commented Mar 10, 2022 at 9:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.