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

RE: st: Question about multinomial logistic regression and random effects with multiply imputed data

From   Maarten buis <>
Subject   RE: st: Question about multinomial logistic regression and random effects with multiply imputed data
Date   Thu, 31 Jul 2008 16:33:55 +0100 (BST)

--- "Barksdale, Crystal" <> wrote:
> We are considering running the analyses on each multiply imputed
> dataset (separately), and then trying to combine the results
> however, we are having some difficulty figuring out how to store the
> parameter estimates and standard errors for each variable and it's
> corresponding category.  For example, if I run a multinomial logistic
> regression with an outcome variable with 3 categories, I will get
> three separate estimates of the predictor.  It is not immediately 
> clear how to save these three separate estimates and standard errors,
> to use ultimately in combining the estimates across the multiply
> imputed datasets. 

In the example below I use the rules from (the rules for computing the
degrees of freedom differs from the one used in mim, it is up to you to
do some reading and find out which one you like best)

*--------------------- begin example ---------------------------
sysuse auto, clear
recode rep78 1/2=3
ice rep78 foreign mpg gear_ratio, clear m(5)

mlogit rep78 foreign mpg gear_ratio if _mj == 1
matrix b = e(b)'
matrix v = e(V)
matrix v = vecdiag(v)'
forvalues i = 2/5 {
	mlogit rep78 foreign mpg gear_ratio if _mj == `i'
	matrix b = b, e(b)'
	matrix vmat = e(V)
	matrix v = v, vecdiag(vmat)'
drop _all
svmat b
svmat v
egen qbar = rowmean(b*)
egen ubar = rowmean(v*)
egen b = rowsd(b*)
replace b = b^2
gen t = ubar + (1 + 1/5)*b
gen se = sqrt(t)
gen df = (5-1)*(1 + 5*ubar/(5+1)*b)^2
*------------------------- end example ------------------------
(For more on how to use examples I sent to the Statalist, see )

Hope this helps,

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

Not happy with your email address?.
Get the one you really want - millions of new email addresses available now at Yahoo!
*   For searches and help try:

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