Statalist


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

Re: st: mvnp code Cappellari & Jenkins 2006


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: mvnp code Cappellari & Jenkins 2006
Date   Tue, 7 Jul 2009 10:52:48 +0000 (GMT)

--- On Tue, 7/7/09, Charlotte Gary wrote:
> Does anyone have tried the code suggested by Cappellari and
> Jenkins Stata Journal (2006)in paragraph 3.4? (I have
> reported the code at the end)
> 
> I am simply trying to run this code (without changes) but
> an error message after “ml maximize” impedes to obtain
> the results that the authors show on p. 170. 

You'll need the change the lines:
scalar `cf22' = sqrt( 1 - `c21'^2 )
scalar `cf33' = sqrt( 1 - `c31'^2 - `c32'^2 )

into:
scalar `cf22' = sqrt( 1 - `cf21'^2 )
scalar `cf33' = sqrt( 1 - `cf31'^2 - `cf32'^2 )

and change the line:
egen `sp'=mvnp(`xb1'`xb2'`xb3'), chol(`C') ///
  draws($dr) prefix(z) signs(`k1'`k2'`k3')

into:
egen `sp'=mvnp(`xb1' `xb2' `xb3'), chol(`C') ///
   draws($dr) prefix(z) signs(`k1' `k2' `k3')

(notice the spaces between variable names)

Hope this helps,
Maarten

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

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



      

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index