2
$\begingroup$

My output is a table of coefficients, together with standard errors and 90 % confidence intervals, nothing else. I miss the degrees of freedom but I do have the number of observations.

How can I calculate a F-statistic testing if some of these coefficients are mutually zero in R?

$\endgroup$
3
  • $\begingroup$ do you have access to the residuals or $R^2$? $\endgroup$
    – utobi
    Commented Nov 19, 2022 at 8:52
  • $\begingroup$ Unfortunately not :( How would this have helped? $\endgroup$
    – Irazall
    Commented Nov 20, 2022 at 0:33
  • $\begingroup$ The omnibus F test can be computed from the $R^2$ but since you do not have access to it you cannot do much... Another possibility could be to build a confidence region, but you need the RSS. $\endgroup$
    – utobi
    Commented Nov 20, 2022 at 19:56

1 Answer 1

1
$\begingroup$

I think it cannot be done without making assumptions. You be the judge of whether or not these assumptions are reasonable.

Your $F$-statistic is a function of the number of parameters in the model ($p$), the total number of observations ($n$), the sum of squared residuals for your model ($SSRes_{model}$), and the sum of squared residuals for a model that always predicts $\bar y$ ($SSRes_{null}$), the last of which is proportional to the variance of $y$. Thus, you need to figure out each of those four quantities. The sample size is given, so you know $n$. You can count the number of parameters in the model, so you can determine $p$. For the $SSRes_{model}$, lets look at the equation for the standard error of a slope coefficient $\hat\beta_j$.

$$ SE(\hat\beta_j)=\sqrt{\dfrac{ SSRes_{model}/(n-p) }{ (n-1)var(X_j) }\times VIF } $$

You know the sample size $n$ and number of parameters $p$. However:

  1. Without knowing how the features are related to each other, you have no idea what the variance inflation factor ($VIF$) is, so you have no way of saying if the confidence intervals are wide because of multicollinearity. Remember, wide confidence intervals that include zero do not preclude a significant joint $F$-test. If you assume independent features, then $VIF=1$, and you can proceed.

  2. Without knowing the feature variance, you also don’t know if the confidence intervals are wide because of the feature variance or because of the residual variance. If you make an assumption that the features have been standardized to have variance equal to one, then you can do the algebra to solve for $SSRes_{model}$, since you can get the standard error from the $90\%$ confidence interval.

Finally, you do not know the marginal variance of $y$. If you assume $y$ to have been standardized to have a variance equal to one, however, then you do, and you can determine $SSRes_{null}$.

In summary, you can do it under the following assumptions.

  1. $VIF=1$ (or some other known/assumed quantity)

  2. Standardized features (or at least one feature with known variance)

  3. Standardized $y$ (or some other way of knowing $var(y)$)

$\endgroup$
2
  • $\begingroup$ Thank you! Actually it would be possible for me to standardize the features, so this is possible. Standardizing y is difficult as it is a dummy variable. Additionally: Could you maybe add the formula for the F-Statistic that some coefficients are zero (I wrongly wrote "all coefficients")? $\endgroup$
    – Irazall
    Commented Nov 20, 2022 at 0:30
  • $\begingroup$ @Irazall If you’re testing nested models, then the $SSRes_{null}$ comes from a restricted model. If you assume perfect independence of the features, I think you can back out what that would be, but I don’t know offhand exactly how it would work. // If you have a dummy variable as $y$, why are you running a linear model? // If you know the number of each category in $y$, you can figure out the variance. Do you? $\endgroup$
    – Dave
    Commented Nov 20, 2022 at 0:52

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