1
$\begingroup$

I am not sure if the title makes sense. Here is my situation.

I am running a regression as below:

$$ y = \alpha_0 + \alpha_1 T_1 + \alpha_2 Z + \epsilon $$

Where $T_1$ is my interested covariate: a binary variable of whether the company listed volunteer as an activity in 2008.

I am interested to see if introducing volunteer since 2002 to 2008 will affect the outcome $y$.

I want to break $T_1$ into two variables (and I have the data): $T_2$: whether the company has introduced volunteer activity since 2002 to 2008, and $T_3$: whether the company had volunteer at the beginning.

So basically $T_2 + T_3 = T_1$. So I am worried that $T_2$, $T_3$ and $T_1$ are correlated each other (but when I run correlation test, the correlation coefficient is very small at about $-0.1$)

What happen if I do that? Does this cause collinearity? Can you please tell me if any of these regressions will have problem?

$$ y = \alpha_0 + \beta_1 T_2 + \beta_2 T_3 + \alpha_2 Z + \epsilon \ \ \ \ \ \ \ \ (1)$$ $$ y = \alpha_0 + \beta_1 T_2 + \alpha_1 T_1 + \alpha_2 Z + \epsilon \ \ \ \ \ \ \ \ (2)$$

Thank you!!

Edited: As suggested by @EdM I posted my regressions after the answer.

I use Stata 13. numbacty is my outcome of interest and I use nbreg (negative binomial regression) as my estimator.

Which one is better? And can someone please give me some interpretation?

The picture below is my Equation 1. initialhiv is $T_3$, that is, having volunteer from the beginning. introhivservice is $T_2$, that is, having introduced volunteer since 2002 to 2008

enter image description here

The picture below is the regression after using 3-level categorical factor. Here levelactyhiv takes the values of 0, 1, 2 if the company has no volunteer, has volunteer from the beginning and having introduced volunteer since 2002 to 2008. enter image description here

$\endgroup$
10
  • $\begingroup$ Why would you do Eq.2? $\endgroup$ – Aksakal Aug 7 '15 at 18:08
  • $\begingroup$ I am just experimenting. Because I don't feel Equation 1 make sense (because a company cannot have both $T_2$ and $T_3$ being 1 so I feel interpretation difficult. How can I interpret (1) if both $\beta_1$ and $\beta_2$ significant? So introducing volunteer and having volunteer from beginning all affect $y$? That is why I do (2). So I will interpret that introducing volunteer has effect! $\endgroup$ – Khan Aug 7 '15 at 18:14
  • $\begingroup$ Is there any reason why you can't change $T_1$ into a factor with 3 levels: volunteer at beginning, volunteer added in 2002 to 2008, and never volunteer? $\endgroup$ – EdM Aug 7 '15 at 18:14
  • 1
    $\begingroup$ Double-check that you entered levelactyhiv as i.levelactyhiv in your Stata command, so that Stata knew it was categorical. I don't use Stata, but from what I've been able to find it should report 2 coefficients for a 3-level categorical variable in output from nbreg; see the variable prog in the example on this page. Also, levelactyfarm shows in your second but not your first output, if that matters. $\endgroup$ – EdM Aug 7 '15 at 20:11
  • 1
    $\begingroup$ It doesn't really matter if a factor has only 2 levels, but if a factor has more than 2 levels then you have to prefix your categorical variable name with i. for Stata to treat is as categorical rather than numeric. Also if a 2-level categorical factor is coded by numbers more than 1 unit apart (e.g., "0" and "2" rather than "1" and "2" or "0" and "1"), then p-values will be OK but the coefficients won't be the same as if your variable was codes as "true/false". $\endgroup$ – EdM Aug 7 '15 at 20:41
1
$\begingroup$

Your Eq.1 should not be an issue as long as this does not hold: $T_2(t)+T_3(t)\equiv const$

when this may happen? If your entire sample consists of volunteering companies, i.e. each company volunteered either between 2002-2008 or outside this period. In this case there's perfect collinearity. If your sample includes companies without volunteer, then there won;t be collinearity.

The interpretation is also easy: you're studying the impact of volunteering on $y$, and you're teasing out the difference between volunteering in 2002-2008 period and otherwise.

Eq.2 is slightly "worse", because the correlation between your exogenous variables is stronger due to $T_1=T_2+T_3$. However, in terms of collinearity, it's the same non-issue. Interpretation would be less clear compared to Eq.1, but still can be done.

$\endgroup$
4
  • $\begingroup$ Thank you! How about the suggestion of @EdM, which one is better Eq.1 or using a 3-level categorical variable? Can you please indicate some keywords on this issue that I can continue to search on? $\endgroup$ – Khan Aug 7 '15 at 19:08
  • 1
    $\begingroup$ @Thien, I don't see the problem with 3-level categorical variable, except it gets complicated when your $Z$ is a lot of control variates. The approach in Eq.1 is similar to linear splines, see e.g. mkspline in Stata. If your $T_1$ was a continuous variable, then mkspline function would enable you to have different slopes in different regions of $T_1$ $\endgroup$ – Aksakal Aug 7 '15 at 19:20
  • $\begingroup$ Thank you. I edited my post to include the two cases: using 3-level variable and using Equation 1. Could you please see if there is any problem and suggest some interpretations? Which one would you prefer? In fact, $T_1$ is binary, so are $T_2$ and $T_3$ and I do have quite a lot controlling variables. I am reading mkspline so please allow me some time. $\endgroup$ – Khan Aug 7 '15 at 19:40
  • $\begingroup$ I've read the mkspline command. As far as I understand (please forgive me if I understand it incorrectly), the way I would mkspline my independent variable is same as the 3-level categorical variable? So I would mkspline my volunteer variables into 2 knots: knot1 - had volunteer from the beginning and knot2 - introducing since 2002. Is that true? Can you please explain why Eq.1 is similar to linear splines? $\endgroup$ – Khan Aug 7 '15 at 20:00
2
$\begingroup$

It seems that you have 2 well-defined hypotheses to test: whether any "volunteer" is different from no "volunteer", and whether "volunteer" from the beginning differs from "volunteer" added from 2002 to 2008.

This might be done by recoding your $T$ variable into a single 3-level categorical factor: "no volunteer", "volunteer from the beginning", and "volunteer added from 2002 to 2008". As I understand your situation, then each case would fit into exactly one category. It doesn't really matter which you treat as the reference factor; just be careful that your analysis doesn't treat this as a numeric variable, but keeps it as categorical.

If this is set up in an analysis of variance context, you will have a test of whether there are any differences among the $\beta$ values for the 3 categories. If there aren't any differences then you are done. If there are differences then you use the information on the $\beta$ values and their standard errors to test the differences among them.

The danger in breaking out the analysis of the two "volunteer" cases, as in your equation (1), is that you lose information provided by the "no volunteer" cases. A combined analysis with more cases might be able to provide better estimates of residual errors and give you more power to detect true differences.

$\endgroup$
8
  • $\begingroup$ Thank you! I marked this as answer because it does help me with my question. But I want to learn a bit more. Can you please give me some indication of "a test of whether there are any differences among the β values for the 3 categories". How can I do this? (a name or keyword for searching would be much appreciated). I thought tests are for categorical dependent variables only (those mlogit and ologit). $\endgroup$ – Khan Aug 7 '15 at 19:02
  • $\begingroup$ And I just want to check if I understand your answer well. Let say use the 3-level categorical variable $T$: 1, 2, 3, if no volunteer, volunteer from beginning and volunteer added. The estimated coefficient is 0.45 and it is significant. How should I interpret that? Can I introducing activity will affect? or having volunteer from the beginning will affect? $\endgroup$ – Khan Aug 7 '15 at 19:04
  • $\begingroup$ It would help to know what statistical analysis program you are using, because programs differ in how they treat categorical variables and how they report coefficients. Also, double-check that your program is not treating $T$ as a numeric variable; if you are only getting 1 coefficient for $T$ it might think that the values of $T$ are numbers rather than markers for different categories. In R you might have to specify as.factor($T$) to make sure. You could edit your question to include output from your statistical analysis program. $\endgroup$ – EdM Aug 7 '15 at 19:18
  • 1
    $\begingroup$ To search for further study, this is the multiple-testing problem in analysis of variance (ANOVA). An initial analysis determines whether there are any differences among the levels, then comparisons are done to determine which differences among levels are significant. Since you have a priori comparisons in mind, you are in a somewhat better position than if you just use the data to try to final all "significant" differences. With your covariate $Z$ your situation might be considered analysis of covariance (ANCOVA), but the fundamental issues in interpretations are the same. $\endgroup$ – EdM Aug 7 '15 at 19:31
  • $\begingroup$ Thank you very much. For your first comment, I have just edited my post. I use Stata 13 and run nbreg estimator. I am reading your second comment so please allow me some time to digest it first. Thank you!! $\endgroup$ – Khan Aug 7 '15 at 19:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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