6
$\begingroup$

I am doing text modeling, where each document can belong to multiple topics. I specify the desired topic number to be 3 and the three topics to be weather, sports, and education. So the model will output a triplet representing the topic mixture of each document.

Let $p_1,p_2,p_3$ denote Pr(weather), Pr(sports), Pr(education), respectively. So a news article that talks about a football match being canceled due to the bad weather may have a triplet $(p_1,p_2,p_3)=(0.4,0.5,0.1)$. The three elements in the tuple sum to $1$.

Now I wish to explore the relationship between topics and the popularity of the document. I start with multiple linear regression. Since $p_1+p_2+p_3=1$, I should only include two of $p_1,p_2,p_3$ like $$y=\beta_0+\beta_1p_1+\beta_2p_2,$$ where $y$ is the reader-rated popularity of the documents.

Denote $p_3$'s coefficient by $\beta_3$ (not in the current model above). Is it possible to test all of the following three hypotheses with the model above?

  1. $\beta_1=\beta_2$;
  2. $\beta_2=\beta_3$;
  3. $\beta_1=\beta_3$.

Is my existing answer below correct? If not, how can I do that?

$\endgroup$
  • $\begingroup$ $\beta_3$ is never defined. What is $\beta_3$? $\endgroup$ – Jake Westfall Aug 23 '15 at 17:40
  • $\begingroup$ @JakeWestfall that's in the original question linked in the first line of this question, where the OP wrote a model with all $x_i$ included. $\endgroup$ – EdM Aug 23 '15 at 17:49
  • 1
    $\begingroup$ This question appears to be undefined. Since $\beta_1$, $\beta_2$, and $\beta_3$ cannot be simultaneously estimated--they are defined only up to a one-dimensional family of linear relations among them--then these three hypotheses cannot be simultaneously defined, either. To make sense of them you have to be more specific about what exactly you mean by "$\beta_3$", since it's not in the model and it makes no sense to include it in the model once $\beta_1$ and $\beta_2$ have been included. $\endgroup$ – whuber Aug 23 '15 at 22:47
  • 1
    $\begingroup$ @EdM This is true, but it doesn't seem to be a great issue in my problem, because the documents in hand are ensured to be just on the three topics. :-) $\endgroup$ – Sibbs Gambling Aug 24 '15 at 8:23
  • 1
    $\begingroup$ You can obtain pairwise p-values exactly as you would in any regression. Interpreting them will be fraught with the usual difficulties. I'm only suggesting that many of the apparent complications in your situation disappear when you treat all three variables on an equal footing simply by leaving out the constant in the model. $\endgroup$ – whuber Aug 25 '15 at 12:41
5
+100
$\begingroup$

EDIT to respond to the altered question:

Again you phrase your hypothesis based on parameters outside this model, which makes it a little uncertain what exactly you are going at. But interpreting your hypotheses to be referring to the marginal effect of each of the three topics being covered in one text, I think what you are trying to do can be done. Basically then the answer is given by following the suggestion in D. Stroet's answer, which is (sort of) equivalent to your own answer and the edited part in @EdM's answer:

  1. $\beta_1=0$ indicates that increasing the content of weather [holding sports constant and consequently reducing education] has no bearing on reader rating. This is equivalent to saying that weather and education are contributing equally to reader popularity.

  2. $\beta_2=0$ the same reasoning applies. This is equivalent to saying that sports and education contribute equally to reader popularity.

  3. $\beta_1=\beta_2$ can be tested just as you intended in you question. Finally, this implies that sports and weather contribute equally to reader popularity

Original Anwer:

I can not comment, hence I'm putting this in an answer. Whoever can, please convert this into a comment.

@Sibbs, can you give a reasonable example, where testing equality of these partial effects (I assume that's what you mean, since you never define $\beta_3$) makes sense, yet such a restriction ($x_1+x_2+x_3=1$) holds? As @EdM points out your "solution" already points to the conceptual flaw of your model/question. Maybe if you elaborate on what brought you there, someone could help you.

It would help to know more about the actual data underlying your model, as presented in the first question. You provided a 3-variable case "for simplicity" but that leads to this problem with only 2 independent coefficients when all $x_i$ must add up to 1. If these are data on fruit, however, there may be additional "components" (like water content, fiber) that have no bearing on perceived "sweetness" other than their influences on the effective concentrations of the sweetness-associated $x_i$. Knowing more about all the original data, as opposed to how some variables have already been transformed in a way that requires them to add to 1, may help resolve your underlying issue without trying to perform a set of comparisons that can't really be done with the restrictions you have imposed.

$\endgroup$
  • $\begingroup$ (+1) for asking the OP to clarify the underlying scientific issue. Often it's better to help the OP reformulate the approach to the underlying issue rather than to give an answer to the question that was initially posed. I think this should stay as an answer; I may edit to bring this into the context of the question that was first asked several months ago and is linked in the present question. $\endgroup$ – EdM Aug 23 '15 at 17:26
  • $\begingroup$ I have updated my question to clarify. Please kindly take a look. Thanks a lot for your kind help! $\endgroup$ – Sibbs Gambling Aug 24 '15 at 2:23
3
$\begingroup$

To test if $\beta_1=\beta_3$, we need to "reframe" the regression a bit. $$Y=\beta_0+\beta_1x_1+\beta_2x_2$$ $$Y=\beta_0+\beta_1x_1+\beta_2(1-x_1-x_3)$$ $$Y=\beta_0+\beta_2+(\beta_1-\beta_2)x_1-\beta_2x_3$$

Now $\beta_1=\beta_3$ is equivalent to $\beta_1-\beta_2=-\beta_2$, becoming $\beta_1=0$. So just test if $\beta_1=0$ for $\beta_1=\beta_3$.

$\endgroup$
  • 1
    $\begingroup$ You are correct, that testing whether $\beta_1=0$ is equivalent to testing whether $\beta_1=\beta_3$. The algebra works fine. The final component is, of course, that testing whether $\beta_2=0$ is equivalent to testing whether $\beta_2=\beta_3$ $\endgroup$ – user1745038 Aug 27 '15 at 18:26
  • $\begingroup$ Thank you all for the great analyses! I learned a lot! Unfortunately, the bounty can be given to only one person. Hats off and sincere thanks too to @EdM and @whuber! $\endgroup$ – Sibbs Gambling Aug 31 '15 at 7:04
  • $\begingroup$ I believe D. Stroet would have deserved the bounty. Anyways... To make it clearer to future readers you could update this (your) answer to get rid of any &\beta_3$s in there. $\endgroup$ – sheß Sep 1 '15 at 14:04
3
$\begingroup$

It's not possible to do all 3 pairwise comparisons of regression coefficients that you wish, because you only really have two regression coefficients.

The value of $\beta_3$ in a linear regression would be the effect of a change in $x_3$ on $Y$ with $x_1$ and $x_2$ held constant. That is not possible in your situation where the $x_i$ must all add up to 1.

All of the information about your regression is included in any choice of 2 of your 3 $x_i$. This is why your algebra came up with the result that the only way for $\beta_1=\beta_3$ is for both to be zero.

Edit based on further reflection:

What you can do in this case comes from the answer by @Glen_b to your previous question. The $\beta_0$ intercept in the model you present on this page represents the value of the Sweetness outcome variable ($Y$) when $x_3$ is the only fruit component present ($x_1$, $x_2$ both 0).

In that context, $\beta_1$ represents the change in Sweetness per change in $x_1$ when $x_2$ is held constant. Since all the $x_i$ must add to 1 and all are (presumably) non-negative, the only way for this to occur is for $x_3$ to go down as $x_1$ goes up. Thus $\beta_1$ represents the excess Sweetness of $x_1$ as it replaces $x_3$ in the mix; the same argument holds for $\beta_2$ as the excess Sweetness provided by $x_2$ as it replaces $x_3$.

So to compare the relative contributions of the $x_i$ to Sweetness, significantly non-zero values of $\beta_1$ and $\beta_2$ mean that $x_1$ resp. $x_2$ contribute differently to sweetness than does $x_3$. The comparison between $\beta_1$ and $\beta_2$ distinguishes $x_1$ from $x_2$.

Although this answers your fundamental question (not the question you posed for the way you originally wanted to proceed), I urge you to consider the original data underlying this work and whether you would be better served by analyzing data closer to their original forms rather than in a form forced to add up to 1, as the answer by @sheß suggests. When data take on necessarily restricted ranges I worry that linear regression might not model the data adequately; I trust that you have extensively examined diagnostics to make sure that your model actually works here.

$\endgroup$
  • $\begingroup$ Yes, I agree with you, but fail to see how this contradicts my answer. So your point is, my answer is not right? If it is wrong, how does one test $\beta_1=\beta_3$? Could you please kindly help make your stance clearer? Thanks a lot! $\endgroup$ – Sibbs Gambling Aug 23 '15 at 16:20
  • $\begingroup$ I have updated my question to clarify. Please kindly take a look. Thanks a lot for your kind help! $\endgroup$ – Sibbs Gambling Aug 24 '15 at 2:23
  • 1
    $\begingroup$ @SibbsGambling if you insist on forcing the 3 topic scores to sum to 1 then you can get the information you want about relative importance of the 3 topics but it does not involve any alleged $\beta_3$. As this answer points out, translated into your new text modeling formulation $\beta_0$ represents popularity of an education-only article, and $\beta_1$ or $\beta_2$ represents the change in popularity as weather or sports replace education in the topic mix. This answer specifies the tests you would run. $\endgroup$ – EdM Aug 24 '15 at 8:13
  • 1
    $\begingroup$ Exactly! I cannot agree more with "The intercept represents the popularity of an education-only article, and $\beta_1$ and $\beta_2$ represent the change!". From here, can't I then conclude: if $\beta_1=0$ => replacing education with weather makes no difference in popularity => weather and education have the same degree of influence on popularity => my existing answer is correct? $\endgroup$ – Sibbs Gambling Aug 24 '15 at 8:27
  • 2
    $\begingroup$ Yes, testing $\beta_1=0$ tells whether weather and education have the same influence on popularity. No, your answer is not correct as you present it. If $\beta_1=0$ and $\beta_1=\beta_3$ then $\beta_3=0$ also. Yet you seem to think of $\beta_3$ as representing the contribution of education content to the popularity of an article. There is no useful way to think about a $\beta_3$ here. $\endgroup$ – EdM Aug 24 '15 at 9:14
1
$\begingroup$

My suggestion is to interpret the t-statistics of $x_1$ and $x_2$ in relation to $x_3$, because the latter is the reference group.

That will answer 2. and 3. Test the equality of $x_{1}$ and $x_2$ separately with an appropriate test which will answer 1.

$\endgroup$
  • $\begingroup$ Downvote after the question was reformulated. Thanks. $\endgroup$ – MaHo Aug 27 '15 at 8:45

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.