I’m using Stata 16.1 on iMac.
I have run two probit models using the same variables but different data. I want to test the equality of the same coefficients in the two models.
Here is the data used in the example below, taken from the Stata file "union".
Here is the code I ran:
probit union year age grade not_smsa south if subset == 1
estimates store m1
probit union year age grade not_smsa south if subset == 2
estimates store m2
suest m1 m2
test [m1_mean = m2_mean]:age
test [m1 = m2]:age
After the "test" commands I got this:
. test [m1_mean = m2_mean]:age
equation m1_mean not found
r(303);
. test [m1 = m2]:age
equation m1 not found
r(303);
Why am I not getting the test results I want?
Thanks for any help,
Wayne Sandholtz
I have run two probit models using the same variables but different data. I want to test the equality of the same coefficients in the two models.
Here is the data used in the example below, taken from the Stata file "union".
Code:
* Example generated by -dataex-. For more info, type help dataex clear input int idcode byte(year age grade not_smsa south union black) float subset 1 72 20 12 0 0 1 1 1 2 71 19 12 0 0 0 1 1 3 70 24 12 0 0 1 1 1 4 70 24 17 0 0 1 0 1 5 70 24 12 0 0 0 0 1 6 71 24 12 0 0 0 0 1 7 70 21 12 0 0 0 0 1 9 70 18 12 0 0 1 0 1 10 70 18 10 0 0 0 0 1 12 77 29 17 0 0 0 0 1 13 70 22 14 0 0 0 0 1 14 78 30 14 0 0 0 0 1 15 72 23 15 0 0 0 0 1 16 70 21 15 0 0 0 0 1 17 70 21 15 0 0 0 0 1 18 77 28 15 0 0 0 0 1 19 70 21 15 0 0 0 0 1 20 70 21 15 0 0 0 0 1 21 72 23 15 0 0 0 0 1 22 70 22 15 0 0 0 0 1 23 70 23 14 0 0 0 0 1 24 70 23 14 0 0 0 0 1 25 70 24 14 0 0 0 0 1 26 70 25 14 0 0 0 0 1 27 70 24 14 0 0 0 0 1 28 77 28 13 0 0 0 0 2 29 70 21 13 0 0 0 0 2 30 72 21 8 0 0 1 0 2 33 70 24 12 0 0 0 0 2 35 82 29 11 0 0 0 0 2 36 70 18 12 0 0 0 0 2 38 70 25 12 0 0 0 0 2 39 82 38 16 0 0 0 0 2 40 71 20 14 0 0 0 0 2 41 70 22 12 0 0 0 0 2 42 72 19 12 0 0 0 0 2 43 78 25 16 0 0 0 0 2 44 70 23 16 0 0 0 0 2 45 72 19 12 0 0 1 0 2 46 77 33 17 0 0 0 0 2 47 71 18 9 0 0 0 0 2 48 87 34 15 0 0 0 0 2 49 70 23 12 0 0 0 0 2 50 72 20 12 0 0 0 0 2 51 70 19 12 0 0 1 0 2 53 72 18 12 0 0 0 0 2 54 77 28 12 0 0 0 0 2 55 70 26 12 0 0 0 0 2 56 77 28 12 0 0 0 0 2 57 71 25 12 0 0 0 0 2 end
probit union year age grade not_smsa south if subset == 1
estimates store m1
probit union year age grade not_smsa south if subset == 2
estimates store m2
suest m1 m2
test [m1_mean = m2_mean]:age
test [m1 = m2]:age
After the "test" commands I got this:
. test [m1_mean = m2_mean]:age
equation m1_mean not found
r(303);
. test [m1 = m2]:age
equation m1 not found
r(303);
Why am I not getting the test results I want?
Thanks for any help,
Wayne Sandholtz
Comment