Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: compare coefficients from two regressions

From   Dirk Nachbar <>
To   statalist <>
Subject   st: compare coefficients from two regressions
Date   02 May 2007 10:55:17 +0100

I run OLS regression on two subsamples and I want to test whether the coefficients in each regression are the same. I have problems with the store and test lines (see code below). How can I do it?

reg y x if sample==1

estimates store model1

reg y x if sample==2

test model1(x)==_x

Dirk Nachbar

Assistant Economist


Department for Work and Pensions

Level 2, The Adelphi

1-11 John Adam St

WC2N 6HT London

020 796 28531

The opposite of a correct statement is a false statement. But the opposite of a profound truth may well be another profound truth.

- Niels Bohr


This document is strictly confidential and is intended only for use by the addressee. 

If you are not the intended recipient, any disclosure, copying, distribution or other 

action taken in reliance of the information contained in this e-mail is strictly prohibited.

Any views expressed by the sender of this message are not necessarily those of the Department 

for Work and Pensions.

If you have received this transmission in error, please use the reply function to tell us 

and then permanently delete what you have received.

Please note: Incoming and outgoing e-mail messages are routinely monitored for compliance 

with our policy on the use of electronic communications.


The original of this email was scanned for viruses by the Government Secure Intranet Anti-Virus service supplied by Cable&Wireless in partnership with MessageLabs. (CCTM Certificate Number 2006/04/0007.) On leaving the GSi this email was certified virus free.
Communications via the GSi may be automatically logged, monitored and/or recorded for legal purposes.

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index