Statalist


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

st: Strange -joinby- behaviour...


From   Neil Shephard <[email protected]>
To   [email protected]
Subject   st: Strange -joinby- behaviour...
Date   Fri, 6 Feb 2009 15:40:21 +0000

I'm trying to -joinby- two datasets and am experiencing some
strange/unexpected behaviour.

After -set trace on- I find the error occurs after loading the -using-
data set.  The strange thing is that a new variable is (purportedly)
being created and then an attempt to sort on that variable is being
made and it no longer exists...


    - use `"`using'"', replace
    = use `"C:\DOCUME~1\neils\LOCALS~1\Temp\ST_0t000015.tmp"', replace
    - tempvar UUNIQUE
    - confirm new var `_merge'
    = confirm new var __000000
    - sort `match'
    = sort patientkey carespellid
    - by `match' : gen long `UUNIQUE' = _n
    = by patientkey carespellid : gen long __000002 = _n   <----Create variable
    - sort `match' `UUNIQUE'
    = sort patientkey carespellid __000002    <---- Where's it gone?
variable __000002 not found


Standard version information for Stata...

. about

Stata/SE 10.1 for Windows
Born 02 Feb 2009
Copyright (C) 1985-2009

...and the verison of -joinby-.....

. which joinby
P:\Stata10\ado\base\j\joinby.ado
*! version 2.0.5  11Jan2001

I can't suss out why this might be happening, any thoughts or advice
are more than welcome,

Cheers,

Neil




-- 
"Only two things are infinite, the universe and human stupidity, and
I'm not sure about the former." - Albert Einstein

Email - [email protected]
Website - http://slack.ser.man.ac.uk/
Photos - http://www.flickr.com/photos/slackline/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index