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: problems with levpet command


From   "Skrinjaric Bruno" <[email protected]>
To   <[email protected]>
Subject   RE: st: problems with levpet command
Date   Wed, 29 Jan 2014 09:10:14 +0100

OK. I think I got it. Apparently, the problem was that I have panel data
with gaps in time variable, i.e. I have data for years 2008, 2010 and
2012. 
I -recode-d variable year to be without gaps, and then -levpet- works.

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Nick Cox
Sent: Tuesday, January 28, 2014 12:27 PM
To: [email protected]
Subject: Re: st: problems with levpet command

OK. I think now that your problem must be something specific to
-levpet-. I am out of advice because I've never used it and don't know
anything about its precise assumptions, but

. set trace on

before -levpet- would show where the program fails. If you show the
results, someone may be able to give advice.


Nick
[email protected]


On 28 January 2014 11:19, Skrinjaric Bruno <[email protected]> wrote:
> Here it is...
>
> . summarize lnrva lnl lnrm lnrk id year
>
>     Variable |       Obs        Mean    Std. Dev.       Min        Max
> -------------+--------------------------------------------------------
>        lnrva |      1047    17,20429    2,074527   8,822554   23,24413
>          lnl |      1047    4,766175    1,732232          0   9,194313
>         lnrm |      1047    17,24891    2,236354   8,082948    23,6598
>         lnrk |      1047     16,8549    2,405058   7,859804   23,52634
>           id |      1047     2549185     1011692     154288    3964248
> -------------+--------------------------------------------------------
>         year |      1047    2009,975    1,627722       2008       2012
>
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Nick Cox
> Sent: Tuesday, January 28, 2014 11:52 AM
> To: [email protected]
> Subject: Re: st: problems with levpet command
>
> You should only remove zeros with good reason, and you have not given 
> one.
>
> On this evidence, you really do have missings, despite your denial.
> Show us the results of
>
> . summarize lnrva lnl lnrm lnrk id year
>
> Nick
> [email protected]
>
>
> On 28 January 2014 10:40, Skrinjaric Bruno <[email protected]>
wrote:
>> . d id year
>>
>> variable storage   display    value
>> name          type    format     label      variable label
>> ---------------------------------------------------------------------
>> -
>> --
>> --------
>> id                 long    %10.0g                     id of the firm
>> year              int     %9.0g                        year
>>
>>
>> . destring id year,replace
>>
>> id already numeric; no replace
>> year already numeric; no replace
>>
>> No, that's still not it. I have removed zero values in hope of 
>> resolving this problem, but it didn't work.
>>
>> -----Original Message-----
>> From: [email protected]
>> [mailto:[email protected]] On Behalf Of Nick Cox
>> Sent: Tuesday, January 28, 2014 11:21 AM
>> To: [email protected]
>> Subject: Re: st: problems with levpet command
>>
>> You've not told us about -id- and -year-. -levpet- requires a numeric

>> panel identifier.
>>
>> If -id- is string, then use -encode-.
>>
>> (Removing zero values: why did you do that?)
>>
>> Nick
>> [email protected]
>>
>>
>> On 28 January 2014 09:59, Skrinjaric Bruno <[email protected]>
> wrote:
>>> Thanks for quick reply. When I do -describe- this is what I get...
>>>
>>> . describe lnrva lnl lnrm lnrk
>>>
>>> variable storage   display    value
>>>    name     type       format     label      variable label
>>> --------------------------------------------------------------------
>>> -
>>> -
>>> --
>>> --------
>>> lnrva           float      %9.0g                               Ln of
>>> Real VA, deflated by
>>>
>>> sectoral deflator
>>> lnl                 float      %9.0g                            Ln
of
>>> labour
>>> lnrm            float      %9.0g                                Ln
of
>>> Real material costs,
>>>
>>> deflated by GDP deflator
>>> lnrk              float      %9.0g                              Ln
of
>>> Real capital stock, deflated
>>>                                                                  by 
>>> GDP deflator
>>>
>>>
>>> Even if I try to destring it, it says they are already numeric...
>>>
>>> . destring lnrva lnl lnrm lnrk, replace force lnrva already numeric;

>>> no replace lnl already numeric; no replace lnrm already numeric; no 
>>> replace lnrk already numeric; no replace
>>>
>>> I still do not know what to do.
>>>
>>>
>>> -----Original Message-----
>>> From: [email protected]
>>> [mailto:[email protected]] On Behalf Of Nick Cox
>>> Sent: Tuesday, January 28, 2014 10:38 AM
>>> To: [email protected]
>>> Subject: Re: st: problems with levpet command
>>>
>>> This often means that some variable that should be numeric is really

>>> string. Look carefully at the results of -describe- on the variables

>>> you are using and try using -destring-.
>>>
>>> Nick
>>> [email protected]
>>>
>>>
>>> On 28 January 2014 09:31, Skrinjaric Bruno <[email protected]>
>> wrote:
>>>
>>>> I have only recently started using Stata and I came across a 
>>>> project
>
>>>> where I have to use levpet command. I have downloaded st060 
>>>> (SJ-4-2)
>
>>>> and installed it.
>>>>
>>>> I want to use the following command:
>>>>
>>>> . levpet lnrva, free(lnl) proxy(lnrm) capital(lnrk) i(id) t(year) 
>>>> valueadded
>>>>
>>>> However I always get to following error:
>>>>
>>>> no observations
>>>> r(2000);
>>>>
>>>> I am very sure I have all the observations for the variables I am
>>> using.
>>>> I am doing this for every sector according to NACE 1-digit 
>>>> classification and the number of observations ranges from 25 - 1125

>>>> across different sectors.
>>>> But I removed all missing values, and also all zero values. All 
>>>> variables are in float format.
>>>>
>>>> I have also read the help file, but I cannot find the solution to 
>>>> my
>
>>>> problem.
>> *
>> *   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/
>>
>> *
>> *   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/
> *
> *   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/
>
> *
> *   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/
*
*   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/

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