Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: "Incompatible types may not assign class to double"


From   Garth Rauscher <garthr@uic.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: "Incompatible types may not assign class to double"
Date   Fri, 28 Sep 2012 10:30:31 -0500

Dear Stata Listservers,

I have  program to graph 11 individual facility measures against
corresponding benchmarks and combine them into one figure. The program
runs fine except for one of the 11 measures pertaining to the rate of
indeterminate test results for a test called HER2. When I isolate this
section of the program as shown below and run it I get the same error
message: "Incompatible types may not assign class to double". One
possible suggestion in the past was that someone had been using a
local macro name corresponding to a name used deep within stata, and
that might be what was causing the incompatibility problem. this is
not true in my case, because these local macro names work throughout
the whole program for each of my measures except for one
(her2_indet_rate).

Are there any other reasons why I might get this error message that
anyone out there has come across?  Thanks, Garth

*------------------------------------------------------*
capture program drop cy10txrange
program cy10txrange, rclass

use `1'_, clear
keep if id==`2'

local var  her2_indet_rate
local tt = "Her2 indeterminate results"
local num =  her2_results_ind
local den =  her2_results
local meas : display %9.2f `var'

twoway (rcap `var'_h `var'_l `var',  lwidth(medthick) lcolor(blue))
        ///
    (scatter `var' `var', msize(vlarge) mcolor(black) msymbol(oh)) if
id==`2', ///
    xlabel(none) ylabel(0(.1).4, format(%9.1f) labsize(vsmall))            ///
    title(`tt', size(small))  xtitle("") legend(off)                ///
    note("`num'  /`den' =`meas'", ring(0) size(small)  position(5))         ///
    saving(_`2'_`var'.gph, replace)
end
*------------------------------------------------------*
cy10txrange  treatanalysis10  5249  "Louis A. Weiss Memorial Hospital"


Garth H Rauscher
Associate Professor of Epidemiology
University of Illinois at Chicago
School of Public health
Division of Epidemiology and Biostatistics
1603 West Taylor Street (SPHPI, M/C 923)
Chicago, IL 60612
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index