Bookmark and Share

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


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

Re: st: Testing coefficients across different models


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: Testing coefficients across different models
Date   Mon, 13 Sep 2010 09:17:33 +0000 (GMT)

--- On Sat, 11/9/10, Garret Christensen wrote:
> I'd like to test whether coefficients change across models.
> 
> My original command/model is reg y x1 x2 z x3 x4
> Then I change some observations in z, and I'd like to test
> if the coefficients on x1 and x2 are the same as before.

When you do regular testing then under the null hypothesis you 
believe that the differences are due to random sampling. In 
your case that does not apply, so the basic logic of testing
does not work for your problem. To me it makes more sense to
view this as a simulation study and look at the Monte Carlo
standard error. Ian White's -simsum- can be useful here, to
install it type -ssc install simsum-, and see his presentation
at the 2009 London Stata Users' Group meeting:
<http://ideas.repec.org/p/boc/usug09/08.html>. Also, see the
example below:

*------------------- begin example -----------------------
// randomish seed, as in:
// http://www.stata.com/statalist/archive/2010-08/msg00891.html
// I am currently visiting Stockholm, so these are the
// 1st 9 digits of the serial number of a 100 swedish krones bill
set seed 843071574

sysuse nlsw88, clear
gen byte black = race == 2 if race <= 2

// remove observations with missing values on relevant variables
keep if !missing(hours, union, grade, black, south, married, never_married)

reg hours union grade black south married never_married
// store the true value
scalar true  = _b[grade]

program drop _all
program define sim, rclass
	sysuse nlsw88, clear
	gen byte black = race == 2 if race <= 2

	keep if !missing(hours, union, grade, black, south, ///
                         married, never_married)

	// flip the race of random 10%
	replace black = !black if runiform() < .1

	reg hours union grade black south married never_married
	return scalar b  = _b[grade]
end

simulate b = r(b), reps(1000) : sim

simsum b, mcse true(true) bias
*---------------------- end example -------------------------
(For more on examples I sent to the Statalist see: 
http://www.maartenbuis.nl/example_faq )

Hope this helps,
Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------


      

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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