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 at the end of May, and its replacement, statalist.org is already up and running.


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

st: levpet - loops and varying results


From   SAM MCCAW <sam2stata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: levpet - loops and varying results
Date   Tue, 9 Oct 2012 13:54:32 -0400

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?


Any insight would be much much appreciated.

Thanks a lot.

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