I'm running Clarify in order to generate confidence intervals for a
multinomial logit model with multiple interaction terms. I am able to run
the estsimp portion of the Clarify commands and successfully complete the
replications, but when I run the do-file I've created in order to set the
values of the interaction terms, Stata crashes. (By crashing, I mean that
Stata says that an error has occurred and shuts down completely.) It's not
consistent in its crashing (that is, I'm sometimes able to generate a few
predicted probabilities), but invariably it crashes before I have what I
need. I'm attaching the portion of the do-file that is of interest.
**Basic model with interactions, multiple responses excluded
estsimp mlogit mip_dv black male edu01 age01 news_for news_gov news_mis
news_rac news_soc news_vna b_x_for- b_x_vna m_x_for- m_x_vna ed_x_for-
ed_x_vna a_x_for a_x_gov a_x_mis a_x_rac a_x_soc a_x_vna if limsamp==1,
b(0)
**Set values
setx mean
setx edu01 mean if limsamp==1
setx age01 mean if limsamp==1
setx black 0
setx male 0
tempname predprob
postfile predprob pp_for_m pp_for_lo pp_for_hi newsflow educ using
"c:\clarify_interact_1.dta", replace
gen maxflow=.45
*Varying news vars
local i=0
while `i' <=maxflow+.02 {
*Adjust mean values
setx edu01 0
setx news_for mn_n_for+((mn_n_for-`i')/6)
setx news_vna mn_n_vna+((mn_n_for-`i')/6)
setx news_gov mn_n_gov+((mn_n_for-`i')/6)
setx news_rac mn_n_rac+((mn_n_for-`i')/6)
setx news_soc mn_n_soc+((mn_n_for-`i')/6)
setx news_mis mn_n_mis+((mn_n_for-`i')/6)
local btemp=0
setx b_x_for `btemp'*news_for
setx b_x_vna `btemp'*news_vna
setx b_x_gov `btemp'*news_gov
setx b_x_rac `btemp'*news_rac
setx b_x_soc `btemp'*news_soc
setx b_x_mis `btemp'*news_mis
local mtemp=0
setx m_x_for `mtemp'*news_for
setx m_x_vna `mtemp'*news_vna
setx m_x_gov `mtemp'*news_gov
setx m_x_rac `mtemp'*news_rac
setx m_x_soc `mtemp'*news_soc
setx m_x_mis `mtemp'*news_mis
local etemp=0
setx ed_x_for `etemp'*news_for
setx ed_x_vna `etemp'*news_vna
setx ed_x_gov `etemp'*news_gov
setx ed_x_rac `etemp'*news_rac
setx ed_x_soc `etemp'*news_soc
setx ed_x_mis `etemp'*news_mis
summarize age01 if limsamp==1, meanonly
local atemp=`r(mean)'
setx a_x_for `atemp'*news_for
setx a_x_vna `atemp'*news_vna
setx a_x_gov `atemp'*news_gov
setx a_x_rac `atemp'*news_rac
setx a_x_soc `atemp'*news_soc
setx a_x_mis `atemp'*news_mis
**Simulate predicted probabilities and post means and confidence intervals
to separate file
local name=`i'*100
simqi, prval(1) genpr(pp_for_`name')
summarize pp_for_`name', meanonly
replace pp_for_m=r(mean)
_pctile pp_for_`name', p(2.5, 97.5)
replace pp_for_lo = r(r1)
replace pp_for_hi = r(r2)
replace newsflow=`i'
post predprob(pp_for_m) (pp_for_lo) (pp_for_hi) (newsflow) (educ)
local i=`i'+.05
}
postclose predprob
I'm using multiple imputed survey data and clarify to test some
relationships and I need to test the stability of various coefficients
(I'm presuming some form of collinearity). I plan to do this by
incrementally removing other predictors from the model and idenitifing
those coefficients that don't react. This process requires me to make
multiple calls to the estsimp command but every time I try to run a
second estsimp (with a different model) after the first I get the error:
r(4):
no data in memory would be lost
this occurs regardless of whether I include the dropsims options or not.
Note: I'm running Stata 6
Matthew Vile, UNO
--
Clarify mailing list served by Harvard-MIT Data Center
[Un]Subscribe/View Archive: http://lists.hmdc.harvard.edu/?info=clarify
Hello,
My name is Matthew G. McClosky, and I am the Internet Sales Manager for Scientific
Computing & Instrumentation.
I was researching companies and individuals using the search term "Statistical
Software" in Yahoo and Google and came across your web site and email address.
Our May editorial focusing is Statistical Software, and I thought you would you be
interested in advertising your software or company with a banner on our website
http://www.scimag.com or in one of our bi-monthly email newsletters?
Email Newsletter:
http://www.mcclosky.net/science/email/SCI.htm
SCI Weekly, is the primary source for the latest product and company news in
laboratory informatics, LIMS, chromatography, data acquisition, imaging,
mathematics, statistics, visualization, data analysis, chemistry, spectroscopy and
more.
Web Site:
http://www.scimag.com
Our web site with over 60,000 page impressions per month contains the latest SC&I
feature articles, Editor's Choice Awards, and new product information. A banner
program on our Website provides you with a comprehensive way to reach potential
buyers, with direct links to your Web site.
If you would like to pursue an Online opportunity further, please call me today. I
look forward to talking with you.
Sincerely,
Matthew G. McClosky
Internet Sales Manager
800-222-0289 x608
973-876-6104 Cell
973-539-3476 Fax
Sign up for SCI Weekly Email Newsletter:
http://register1.scimag.com/scimag/pc.asp
Simply reply to this email with the subject "remove" if you would no longer like
to receive emails from me.
Gary,
Since -estsimp- does not support the -svyreg- command, I wonder how to
encorporate corrections for survey design within the clarify package. Since
clarify really computed standard errors and CIs using the empirical
distribution of the simulations, does it really matter? How about survey
weights if I wanted to weight the regression?
Thanks,
Michael
--
Clarify mailing list served by Harvard-MIT Data Center
[Un]Subscribe/View Archive: http://lists.hmdc.harvard.edu/?info=clarify