2
$\begingroup$

If we want to test: population with a high level of education were less likely to contract COVID, which of the following regression(s) we should run? Explain whether each one is appropriate.

LN is natural log.

(1) CASES on POPULATION PHIGHSCOOL

(2) LN(CASES) on POPULATION PHIGHSCOOL

(3) LN(CASES) on LN(POPULATION) PHIGHSCHOOL

(4) CASES/POPULATION on PHIGHSCHOOL

(5) LN(CASES/POPULATION) on PHIGHSCOOL

(6) LN(CASES/POPULATION) on LN(PHIGHSCHOOL)

Data set includes:

COUNTRY Country name

REGION Country region

CASES Total number of COVID cases thus far in the country

DEATHS Total number of COVID death thus far in the country

CPI Current consumer price index of the country

PHIGHSCHOOL Percent of adults achieved high school education

LIFEEXPECTANCY Years

GDP GDP in current year

POPULATION Number of population

For this question, I'm not allowed to use excel, stata, etc,.. to check how the data is skewed. Semi-log and log-log are throwing me off a bit here since both 3 and 6 looks like appropriate models to me. Since PHIGHSCHOOL is the only one that's not a count variable, do we still need LN it like in model 6? If not, would that make model 3 the most appropriate?

$\endgroup$
4
  • $\begingroup$ First, I think you should explain your notation a bit. I'm guessing "LN" here means the natural log, but that's not clear. Additionally, it would be very helpful to know the distributional aspects of your data before applying such methods. Log-log regressions, for example, are typically performed on pairs of variables which are both heavily right skewed. The biggest thing that sticks out to me is that education is discrete and takes on few values while COVID cases are always non-negative (thus bounded to a degree). Scatterplots would illuminate a lot. $\endgroup$ Oct 14, 2023 at 3:25
  • $\begingroup$ Yes, LN is natural log. Thank you for your answer. $\endgroup$
    – Dannis
    Oct 14, 2023 at 6:00
  • $\begingroup$ This reads like a homework question. If so, please add the self-study tag and read its description. $\endgroup$ Oct 14, 2023 at 6:06
  • $\begingroup$ @COOLSerdash Will do. Thank you for the suggestion $\endgroup$
    – Dannis
    Oct 14, 2023 at 6:19

1 Answer 1

1
$\begingroup$

I think the answer to this question should always include "inspect your data" (or at least check model fit) as one of the steps. It looks like this is more of a textbook exercise though, so I would theorize along these lines:

Your outcome is a count, meaning non-negative integers only. An appropriate model should account for this, so a Poisson or negative binomial GLM would be a good starting point. That has relatively little to do with the choice of dependent and independent variables though.

Because a count cannot be less than zero, the predictor is usually log-linked to ensure the model does not predict anything below 0. A side effect of this transformation is that it plays along with the usual mean-variance trend that counts display - larger counts tend to have higher variance, but will be squished closer together by the transformation. If $y$ is your count and $\mathbf{\beta X}$ your linear predictor, you could write this as $ln(y)=\mathbf{\beta X}$ but in reality you would be fitting $y=e^{\mathbf{\beta X}}$. So, an appropriate model works in the log scale, but you would not be taking the log of the count yourself (unless you're shoehorning all of this into an ordinary least squares or something).

A second aspect in counting is to keep in mind the basis of that count. If one population is much larger than another you'd expect them to have higher counts just by virtue of there being more people (if they have roughly the same chance of being a case). What you really want to model is the number of cases divided by the total possible cases: if we add $n$ to express the size of each population our previous model becomes $ln(\frac{y}{n})=\mathbf{\beta X}$. Through the rules of logarithms we can shuffle this to be $ln(y)=\mathbf{\beta X}+ln(n)$. Two important points here: this new term is not a model parameter like the other $\mathbf{\beta}$, but rather an additive term in the intercept, and is usually called an offset (it moves the prediction within each population by a constant proportional amount). Secondly, you would be taking the log of this variable yourself when fitting the model under a log link, which in the link scale is now $y=e^{\mathbf{\beta X+ln(n)}}$. The result of such offset is that the model no longer predicts a raw case count, but a number of cases per number of persons.

The above two I would always do when building a model on event rates. The last question is what to do with the proportion of high-schooled adults in the predictor. There may be arguments, especially for interpretability, to put this in the model untransformed, and if the proportion is never close to $0$ or $1$ that shouldn't be much of an issue. Just like a count such proportions are (even more) restricted in their support though, and the model doesn't know this - it will just calculate a Gaussian error term onto it. A transformation can help so that predictions make more sense, i.e stay within the support of the variable. Taking the log helps if the proportion is very close to $0$ but not so when it is close to $1$. I would guess that most populations have a sizeable fraction of high-schooled adults, so for that reason I would actually consider a logit transform here which will also handle the upper end of the domain. A major disadvantage is that you'd now have to express model effects as multiplicative changes in counts (because of the log link) in relation to multiplicative changes in high school education (because of the second log/logit), which makes interpretation quite a bit more complicated but is numerically more well-behaved.

That was quite a bit of text without answering your question directly, but I hope this helps you assess the adequacy of each proposed model structure (the notation of which isn't sufficiently specific to me to give an exact answer).

$\endgroup$
3
  • $\begingroup$ Getting predictions does not seem to be the goal of the analysis, so the transformation hunt is not worth the powder, given the complexity of interpretation of the education coefficient it introduces. And what is good for the logit goose, it just as good for the log gander. $\endgroup$
    – dimitriy
    Oct 14, 2023 at 11:45
  • $\begingroup$ I certainly see your first point, which is why I didn't put that under 'would always do'. There's a case to be made for either though I agree that interpretability matters a lot. However, the log does not nearly 'stretch out' the parameter space as much near 1 as it does near 0, so I would still consider other transformations more appropriate if proportions ~1 do occur in the data? (and if you choose to transform in the first place) $\endgroup$
    – PBulls
    Oct 14, 2023 at 12:26
  • $\begingroup$ Yes, this was a great help. Thank you for taking the time to explain each part of the model. @PBulls $\endgroup$
    – Dannis
    Oct 14, 2023 at 12:56

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.