1
$\begingroup$

I want to compare the value of a subgroup against the same value in the total population in a regression setting. The easiest way to do it would be to treat the subgroup and the total dataset as two different groups and perform the usual regression.

Of course, this would artificially inflate the numerosity and degree of freedom, considering some subjects twice. Is there any way to account for this, like a weighting scheme? Or is it totally a stretch of the assumption behind inferential testing?

$\endgroup$

1 Answer 1

0
$\begingroup$

Isn't this an ANOVA kind of question. You have $Y = \mu + \beta + \ldots + \epsilon$ where $\mu$ is the global mean, $\beta$ is the difference between global mean and subset mean for one subset. You're wanting to know if $\beta$ is zero (no difference) or non-zero (a difference)?

$\endgroup$
6
  • $\begingroup$ Yep, but in addition to the p-value itself I'm interested in the statistic $\beta / s.e(\beta)$ and confidence intervals (it doesn't change much though) $\endgroup$
    – Bakaburg
    Commented Dec 4, 2019 at 9:48
  • $\begingroup$ Won't you get that from fitting the model? Fit this as a linear model (not an ANOVA). $Y = \beta_0 x_0 + \beta_1 x_1 \ldots$ where $x_0$ is 1 for every row, and where $x_1$ is $1$ for every row corresponding to your first subset, $0$ otherwise. $\endgroup$ Commented Dec 4, 2019 at 10:37
  • $\begingroup$ uhm, I don't really get how it should work and what you mean by linear not ANOVA? regression is ANOVA based isn't it? $\endgroup$
    – Bakaburg
    Commented Dec 4, 2019 at 16:41
  • $\begingroup$ Yes, but I thought you meant you were looking at ANOVA tables (sums of squares and degrees of freedom and so on) which don't explicitly link the parameter estimates. Yes, ANOVA is "just" regression with categorical predictor variables. But depending on the software you're using, you may only get the table. If you explicitly fit a linear model you should get parameter estimates for (k-1) factor levels (where k is the number of subgroups). Looking at the parameter estimate for the subgroup of interest should answer your question? $\endgroup$ Commented Dec 5, 2019 at 11:31
  • $\begingroup$ If I fit a regression (actually I'm doing that) with sum contrast (C(x, contr.sum) in R) I get the difference between $E(y|group)$ and $E(y|\overline{group})$, and also one group is always removed since it goes into the intercept (I don't really get why this happens also with contr.sum). instead I'm looking for $E(y|group) - E(y)$, without loosing any group. $\endgroup$
    – Bakaburg
    Commented Dec 6, 2019 at 9: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.