Statalist


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

Re: st: Re: Using -simulate- with returned matrices from estimation commands


From   moleps islon <[email protected]>
To   [email protected]
Subject   Re: st: Re: Using -simulate- with returned matrices from estimation commands
Date   Tue, 14 Apr 2009 22:48:53 +0200

OK.. that was helpful. Didnt know the matrix automatically found its
way into simulate.

However, my objective here is to use stepwise,pr (0.1): regress x y z
d f and to return the matrix for each run so that I in the end can see
how often the variable was selected in the model and also see whether
it had a pos or neg beta (Similar to Sauerbreis selection and
stability procedure). So preferably I'd like -simulate- to return the
final matrix for each run with its associated betas for each model.


On Tue, Apr 14, 2009 at 10:09 PM, Martin Weiss <[email protected]> wrote:
> <>
>
> This certainly works, the betas are returned by default...
>
> ***
> cap prog drop bootbeta
>
> sysuse auto, clear
>
> program bootbeta
>
> preserve
> bsample
> reg price weight rep for tr turn
> restore
>
> end
>
> simulate, r(100):bootbeta
> ***
>
> Although it makes you wonder why you do not use the -vce(boot)- option
> directly...
>
>
> HTH
> Martin
> _______________________
> ----- Original Message ----- From: "moleps islon" <[email protected]>
> To: <[email protected]>
> Sent: Tuesday, April 14, 2009 9:58 PM
> Subject: st: Using -simulate- with returned matrices from estimation
> commands
>
>
>> I've been fiddling around searching for solutions to this but to no
>> avail. Is this at all possible?
>>
>> E.g. program sketch
>>
>> program a
>>
>> preserve
>> bsample
>> e-command
>>
>> return beta-matrix
>> restore
>>
>> end
>>
>> simulate beta-matrix,r(100):bootbeta
>>
>>
>> Regards,
>>
>> Moleps
>> *
>> *   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/
>>
>
> *
> *   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/
>

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