Re: efficient computation of many univariate least squares fits



john.tramuta@xxxxxxxxxxxxxx wrote:


How would I use the QR to efficiently compute *all* the p times q
univariate regressions, with a t-test for each?


For each X variable, compute M'M, factor it, then for each Y solve (M'M)B=M'Y for B using the factored form of M'M (unless MATLAB, or whatever you're using, automatically solves inconsistent systems using L2 approximation -- see my response to Greg). Since M'M is 2x2, though, I'm not sure factorization really is necessary.

To do the t-tests, you need the diagonal entries of the inverse of M'M.

The suggestion in a different subthread to use the master correlation matrix may be a good alternative, particularly if (a) you're using something that has a built-in (efficient) routine for calculating correlations and (b) it has a built-in t-test (z-test?) for the significance of the correlations. The one caveat there is that if you ask for the correlation matrix of the nx(p+q) matrix of X's and Y's, you'll get (and pay for) the p(p-1) correlations of X's with other X's and the q(q-1) correlations of Y's with other Y's, which do not benefit you at all. If there's a routine that will compute the pxq matrix of X-Y correlations only (and test them), that's a good choice.

/Paul
.



Relevant Pages

  • Re: Is there a statistical test for comparing two sets of values (which are statistics)?
    ... that the population elements are correlations is relevant only to the ... Thanks for concuring that "it it might suggest heteroscedasticity". ... the t-test does; that is, it makes the same kind of errors. ... and within-group person-to-person variability in the true ...
    (sci.math)
  • Re: tails and variance
    ... >> I am doing correlations as well, but I still want to do a t-test to see ... > particular age-related cutoff point for clinical purposes? ...
    (sci.stat.consult)
  • Re: tails and variance
    ... > I am doing correlations as well, but I still want to do a t-test to see ... particular age-related cutoff point for clinical purposes? ...
    (sci.stat.consult)
  • Difference between two dependent partial correlations
    ... The standard error of the difference ... The t-test procedure is used for simple correlations. ...
    (sci.stat.consult)
  • Re: PCA C code contradictions
    ... how I advised simple correlations to be used. ... the formula for the REAL correlation matrix! ... Most typos are inconsequential, as the typo in the title above. ... that betray the claim of the misspeller as an expert in statistics. ...
    (sci.stat.math)