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 <>
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" <> 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,

*----------- 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
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

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.* 
*   For searches and help try:

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