Bookmark and Share

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

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

st: levpet - loops and varying results

From   SAM MCCAW <>
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.

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index