Statalist The Stata Listserver


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

Re: st: How to get standard errors for a generated regressor


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: How to get standard errors for a generated regressor
Date   Thu, 8 Mar 2007 15:45:54 +0000 (GMT)

--- "Kristin J. Kleinjans" <[email protected]> wrote:
> I estimate both a multinomial and an ordered logit model, where two
> of the independent variables have been derived using factor analysis
> (I use the predicted factors). I was hoping that one of you might
> know how to get the correct standard errors for these?
> 
> I use Stata 8 (intercooled).

One thing you can do is use the bootstrap. In each bootstrap sample you
first create the variables using factor analysis, and then in the same
bootstrap sample you estimate the regression of interest. See the
example below.

Hope this helps,
Maarten

*----------- begin example --------------
set more off
sysuse auto, clear
tempfile temp
capture program drop bootfac
program define bootfac, eclass
	factor headroom trunk length turn displacement, /*
        */ factors(1)
	score size
	reg mpg foreign size
	matrix b = e(b)
	matrix V = e(V)
	ereturn post b V
end
bootfac
drop size
bootstrap bootfac _b, reps(1000) saving(`temp')
use `temp', clear
hist b_size, normal
*------------ end example -----------------


-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


		
___________________________________________________________ 
What kind of emailer are you? Find out today - get a free analysis of your email personality. Take the quiz at the Yahoo! Mail Championship. 
http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk 
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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