[R] How do I test against a simple null that two regressions coefficients are equal?

markleeds at verizon.net markleeds at verizon.net
Thu Jul 8 05:26:30 CEST 2010


   wow chuck. you really know how to dig up the archives. I don't know if it's
   exactly relevant for what the OP is asking but i did use the
   ( or atleast a )Â  paper by hotelling and it was titled "the selection of
   variates for use in prediction with some comments on the general problem of
   nusiance parameters. annals of mathematical statistics, 11, 271-283. joseph
   lucke is not in that sequence of emails but I think he also helped me track
   down relevant literature on it so credit goes to him also.

   On Jul 7, 2010, Charles C. Berry <cberry at tajo.ucsd.edu> wrote:

     On Wed, 7 Jul 2010, chen jia wrote:
     > Hi there,
     >
     > I run two regressions:
     >
     > y = a1 + b1 * x + e1
     > y = a2 + b2 * z + e2
     >
     > I want to test against the null hypothesis: b1 = b2. How do I design the
     test?
     >
     You are testing a non-nested hypothesis, which requires special handling.
     The classical test is due to Hotelling, but see the references (and R code
     snippets) in this posting:
     http://markmail.org/message/egnowmdzpzjtahy7
     (it is the merest coincidence that the above thread was initiated by Mark
     Leeds and that the URL is 'markmail' :-) )
     HTH,
     Chuck
     > I think I can add two equations together and divide both sides by 2:
     > y = 0.5*(a1+a2) + 0.5*b1 * x + 0.5*b2 * z + e3, where e3 = 0.5*(e1 +
     e2).
     > or just y = a3 + 0.5*b1 * x + 0.5*b2 * z + e3
     >
     > If I run this new regression, I can test against the null b1 = b2 in
     > this regression. Is it an equivalent test as the original one? If
     > yes, how do I do that in R?
     >
     > Alternatively, I think I can just test against the null:
     > correlation(y, x) = correlation(y, z), where correlation(. , .) is the
     > correlation between two random variables. Is this equivalent too? If
     > yes, how do I do it in R?
     >
     > Thanks.
     >
     > Best,
     > Jia
     >
     > --
     > Ohio State University - Finance
     > 248 Fisher Hall
     > 2100 Neil Ave.
     > Columbus, Ohio 43210
     > Telephone: 614-292-2830
     > http://www.fisher.osu.edu/~chen_1002/
     >
     > ______________________________________________
     > R-help at r-project.org mailing list
     > https://stat.ethz.ch/mailman/listinfo/r-help
     > PLEASE do read the posting guide
     http://www.R-project.org/posting-guide.html
     > and provide commented, minimal, self-contained, reproducible code.
     >
     Charles C. Berry (858) 534-2098
     Dept of Family/Preventive Medicine
     E mailto:cberry at tajo.ucsd.edu UC San Diego
     http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901
     ______________________________________________
     R-help at r-project.org mailing list
     https://stat.ethz.ch/mailman/listinfo/r-help
     PLEASE do read the posting guide
     http://www.R-project.org/posting-guide.html
     and provide commented, minimal, self-contained, reproducible code.


More information about the R-help mailing list