Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: -simulate- collecting matrices


From   Austin Nichols <austinnichols@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: -simulate- collecting matrices
Date   Wed, 9 May 2012 16:35:43 -0400

László Sándor <sandorl@gmail.com>:
Make your program eclass, and put every matrix in one big vector to post as b.
Or return scalars.

On Wed, May 9, 2012 at 2:49 PM, László Sándor <sandorl@gmail.com> wrote:
> Hi all,
>
> I am trying to run a Monte Carlo with -simulate- where my underlying
> code "ereturns" results in matrices. However, simulate does not even
> start, probably because the expression in the prefix cannot be a
> matrix. I am looking for ways to work around this. I have some hope as
> the default (with no exp given) is collecting _b from the runs, which
> is also a matrix.
>
> Please let me know how this might work.
>
> The ereturned matrices are generated in the mata lines like this:
> st_matrix("e(ate)", taun)
>
> The simulate code should simply go as
> simulate e(ate) e(ate_se_unadj) e(ate_se_adj) e(atet) e(atet_se_unadj)
> e(atet_se_adj) e(dgp_ate) e(dgp_atet)  e(time), reps(10): mc1e
>
> (This worked with an earlier version of the code when all of these
> ereturned were scalars. So it must be the matrices...)
>
> I am grateful for all the help I get on this list --- I opted not to
> thank you all the time, to spam you less, but I am grateful. Thanks!
>
> Laszlo

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index