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
Nick Cox <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: problems with levpet command
Date
Tue, 28 Jan 2014 10:51:53 +0000
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/