Skip to content
Prev 385656 / 398503 Next

linearHypothesis

Dear Johan,
On 2020-09-17 9:07 a.m., Johan Lassen wrote:
Yes, assuming of course that the hypothesis makes sense.
First, linearHypothesis() doesn't literally fit alternative models, but 
rather tests the linear hypothesis directly from the coefficient 
estimates and their covariance matrix. The test is standard -- look at 
the references in ?linearHypothesis or most texts on linear models.

Second, formulating the hypothesis using alternative models is also 
legitimate, since the second model is a restricted version of the first.
You need not supply the constant regressor t0 explicitly and suppress 
the intercept -- you'd get the same test from linearHypothesis() for 
lm(y~t1+t2+t3+t4,data=data).
test = "F" is the default.
Yes, this is equivalent to the test performed by linearHypothesis() 
using the coefficients and their covariances from the original model.

I hope this helps,
  John
Message-ID: <a3aff576-2e35-64ae-399e-f7dfbe6c7310@mcmaster.ca>
In-Reply-To: <29588_1600348118_08HD8bO2031985_CAAqXfsd8+cLDY9Lia4mg6WpCZ8va3wb1cB4d4str5yj56Vrq7Q@mail.gmail.com>