Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: comparison of coefficients of the same variable across two log-linear models with t-test

From   Maarten Buis <>
Subject   Re: st: comparison of coefficients of the same variable across two log-linear models with t-test
Date   Mon, 9 Dec 2013 10:16:46 +0100

On Mon, Dec 9, 2013 at 8:12 AM, James Bernard wrote:
> I wonder if equality of coefficient of the same variable across two
> similar models  that are run on two different samples can be tested
> using t-test.
> Y=a+b1X (run on sub-sample 1)
> Y=a+b2X (run on sub-sample 2)

I assume you do not want to constrain the constants to be the same in
both sub-samples, i.e. the a in your equations should have been a1 and

In that case you can estimate the entire model in one go, as in the
example below:

*------------------ begin example ------------------
webuse epilepsy
xtset subject
xtpoisson  seizures i.treat##(c.lbas c.lage i.v4), irr
*------------------- end example -------------------
* (For more on examples I sent to the Statalist see:
* )

The indicator variable (some prefer the word dummy variable, I don't)
treat identifies your sub-samples. Lets say your X is lbas in this
example. So the test whether the effect of lbas is the same in the
treated and non-treated group is reported directly in the output next
to treat#c.lbas. So the effect of lbas is about (1-1.42)*100% = 42%
larger in the treated group as in the non-treated group. Note that I
used the -irr- option to ensure that I could use this interpretation
of the output. See: (Buis 2010) for more on how to interpret
interaction terms in such non-linear models. Notice however that in
this example the hypothesis that this difference is 0% could not be
rejected at the 5% level, it could however be rejected at the 10%

M.L. Buis (2010) "Stata tip 87: Interpretation of interactions in
non-linear models", The Stata Journal, 10(2), pp. 305-308.

Hope this helps,

Maarten L. Buis
Reichpietschufer 50
10785 Berlin
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index