It seems that the byable option does not work correctly when used with
a class member program. (I am using Stata Version 8.2.) For example,
if I try to create a test class:
version 8.2
class testclass {
}
program .test, byable(recall)
if _by() {
disp "by option worked"
}
end
I find:
. .tc = .testclass.new
. sort index
. by index: .tc.test
unrecognized command: .tc.test invalid command name
r(199);
However, if I define the program:
program test, byable(recall)
if _by() {
disp "by option worked"
}
end
I obtain
. by index: test:
------------------------------------------------------------------------------------------------------------------------
-> index = 0
by option worked
------------------------------------------------------------------------------------------------------------------------
-> index = 2
by option worked
------------------------------------------------------------------------------------------------------------------------
-> index = 3
by option worked
------------------------------------------------------------------------------------------------------------------------
-> index = 5
by option worked
------------------------------------------------------------------------------------------------------------------------
-> index = 13
by option worked
------------------------------------------------------------------------------------------------------------------------
-> index = 26
by option worked
Is there some way to use the by option successfully within a class
member program?
Thanks,
Shrenik
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/