Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: levpet - loops and varying results


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: levpet - loops and varying results
Date   Tue, 9 Oct 2012 19:59:54 +0100

I'll guess that bootstrapping is behind #1 too. Look what is failing:
<stuff>_bs_gmm.

On Tue, Oct 9, 2012 at 7:45 PM, Nick Cox <njcoxstata@gmail.com> wrote:
> I've never used this, but the answer to #2 presumably follows from
> Brian Poi's answer in
>
> http://www.stata.com/statalist/archive/2012-10/msg00332.html
>
> That is, the standard errors come from the bootstrapping, and so too
> do any P-values.
>
> Nick
>
> On Tue, Oct 9, 2012 at 6:54 PM, SAM MCCAW <sam2stata@gmail.com> wrote:
>> Hello All,
>>
>> I am running into 2 problems with running levpet.
>>
>> (Problem No. 1):
>>
>> When I run levpet industry by industry it works fine. But when I do
>> the same thing with the following loop I get an error message.
>>
>> So the individual command is as follows:
>>
>>                  eststo: levpet lnY if industryno_5 == 1, free (lnl)
>> proxy (lnM) capital (lnK1) revenue
>>
>> And, my loop command is as follows:
>>
>>         foreach i of varlist  industryno_1 - industryno_23 {
>>                         eststo: levpet lnY if `i' == 1, free (lnl) proxy (lnM) capital
>> (lnK1) revenue reps (50)
>>                         predict lnY_hatind_`i', omega
>>                         gen lnTFPind_`i' = lnY -  lnY_hatind_`i'
>>                         }
>>
>> The error message when using the loop is as follows for the same
>> industry which worked fine when run through an individual command:
>>
>>         .......insufficient observations
>>         error #2001 occurred in program nllp_bs_gmm
>>
>> (Problem no. 2)
>>
>> When running levpet industry by industry, the stata output keeps
>> varying for P>|z| values. So everytime I run the same command I get a
>> different P>|z| value although the coeffecients remain the same. Is
>> there a way to restrict this?
>>
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index