On Sat, 15 Nov 2008, Allin Cottrell wrote:
On Sat, 15 Nov 2008, Thomas La Bone wrote:
> I have two sets of data that are not time series. I would like
> to fit separate linear models (intercept and slope) to each set
> of data and then test if the models are the same (intercepts and
> slopes are equal). I understand that this may be done with the
> Chow test and that Gretl offers this test. Can I do what I want
> here with the Chow test in Gretl?
Yes, you can.
You can also do this "by hand". Here is an example which may be close to
what you need; it uses one of the example datasets supplied with gretl, in
which we test the hypothesis that the relationship between age and illness
is the same for men and women.
<script>
open rac3d
list X = const AGE
list Z = null
loop foreach i X
fem_$i = SEX*$i
Z += fem_$i
end loop
ols ILLNESS X Z
omit Z --quiet
</script>
Hope this helps,
Riccardo (Jack) Lucchetti
Dipartimento di Economia
Università Politecnica delle Marche
r.lucchetti(a)univpm.it
http://www.econ.univpm.it/lucchetti