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: Computing z-scores with zanthro Issue


From   Joerg Luedicke <joerg.luedicke@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Computing z-scores with zanthro Issue
Date   Tue, 11 Feb 2014 10:24:37 -0500

Your data does not need to be sorted in any specific way for -egen
zanthro- to run. The error message seems to be due to the reference
data which in this case (i.e. US CDC) should be contained in the file
-bmiageus.dta- and which -egen zanthro- apparently wants to have
sorted. Try to download the data file again or try

*-------------------------
use zbmiageus.dta
sort __SVJCKHsex  __SVJCKHxmrg
save zbmiageus.dta
*-------------------------

Then -egen zanthro- should run without complains.

Please remember to mention where user-written commands come from and
which version you use. My above comments are based on using
-_gzanthro.ado-  version 1.0.2 dec2011, SJ13-2 dm0004_1.

Joerg

On Tue, Feb 11, 2014 at 10:09 AM, Patrick Abi Nader <p0abin01@gmail.com> wrote:
> hello Stata users,
>
> I am trying to compute z-scores for children's BMI data. I found the
> zanthro package and downloaded it.
> this is the code that I am using and I believe it is the correct one
>
> "egen zbmi = zanthro(v3_bmi,ba,US), xvar(v3_chd_ageyears)
> gender(gender)gencode(m=1, f=2) ageunit(year)"
>
> v3_bmi is my bmi variable, ba is the growth chart for 2-20 years old
> in the US, v3_chd_ageyears, is child age in year, and my gender
> variable is also included.
> after I run the code this is the error that I have received:
>
> "using data not sorted r(5);"
>
> So I sorted the data on the BMI variable and subsequently on the age
> and ID variables and it still gave me the same error. Does anyone have
> any suggestions?
>
> Thanks
> Patrick
> *
> *   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