I want to drop all of the functions I have created. Unfortunately, somehow a function -- _b_stat() -- that I did not create and which does not show up with
nonetheless matches the expression mata drop *(), producing error 310:
I ran an nbreg earlier in the code, so I'm guessing that's where _b_stat() comes from. Is there some way I can make _b_stat() eligible for dropping? I've tried killing the nbreg results with ereturn clear to no effect.
By the way, my reason for dropping my functions is paranoia. Earlier, when I dropped an asarray/struct that I no longer needed, it sped up the slowest part of my code by a factor of 20. Currently, I'm facing a similar problem: it takes 20 minutes to perform an operation the first time I try it (in the full context of the do file); but if I open a new session and mata matuse the exact same objects used by my do file, it runs in 20 seconds. My Stata data is empty in both cases.
This is related to a thread on the soon-to-be-deleted mailing list/forum, reproduced below. Apparently, Mr Jeanty found a solution, but it's not included with his message. Sorry about the formatting; the new Statalist doesn't like the old Statalist's line breaks, I guess.
Code:
mata desc *()
[P] error . . . . . . . . . . . . . . . . . . . . . . . . Return code 310
not possible because object(s) in use;
This can occur with mata describe and mata drop and indicates
that the objects referred to cannot be described or eliminated
because an earlier iteration of Mata is currently using them.
not possible because object(s) in use;
This can occur with mata describe and mata drop and indicates
that the objects referred to cannot be described or eliminated
because an earlier iteration of Mata is currently using them.
By the way, my reason for dropping my functions is paranoia. Earlier, when I dropped an asarray/struct that I no longer needed, it sped up the slowest part of my code by a factor of 20. Currently, I'm facing a similar problem: it takes 20 minutes to perform an operation the first time I try it (in the full context of the do file); but if I open a new session and mata matuse the exact same objects used by my do file, it runs in 20 seconds. My Stata data is empty in both cases.
This is related to a thread on the soon-to-be-deleted mailing list/forum, reproduced below. Apparently, Mr Jeanty found a solution, but it's not included with his message. Sorry about the formatting; the new Statalist doesn't like the old Statalist's line breaks, I guess.
st: RE: anketest r(310)
On Tue, Jan 10, 2012 at 11:17 AM, Jane Harrison <[email protected]> wrote: >> To test for spatial autocorrelation in the residuals, I typed: >> >> anketest, wn(merge2) wf(Stata) model(iv-sar) // test for spatial autocorrelation in the residuals >> >> I then received the following error message: >> >> classdef _b_stat() in use >> (nothing dropped) >> (160 lines skipped) >> >> (error occurred while loading anketest.ado) >> >> r(310); >> end of do-file >> >> Here is a description of r(310): > >> [P] error . . . . . . . . . . . . . . . . . . . . . . . . Return code 310 >> not possible because object(s) in use; >> This can occur with mata describe and mata drop and indicates >> that the objects referred to cannot be described or eliminated >> because an earlier iteration of Mata is currently using them. >> >> Any ideas on what this means and how to fix it? >> >> Thanks, >> Jane >> >> >> >> -- >> Jane L. Harrison, PhD Candidate >> Forest Social Science, Oregon State University >> [email protected] I have pinned down the problem. A new version of -anketest- that fixes the issue will be made available for download shortly. But, in the meantime, Jane can check with me off-list for a quick solution. Regards, Wilner ________________________________ P. Wilner Jeanty, PhD Rice University, Houston, Texas Phone: (713) 348-3114 Email: [email protected]
From | "P. Wilner Jeanty" <[email protected]> |
To | [email protected] |
Subject | st: RE: anketest r(310) |
Date | Wed, 11 Jan 2012 14:38:41 -0600 |
On Tue, Jan 10, 2012 at 11:17 AM, Jane Harrison <[email protected]> wrote: >> To test for spatial autocorrelation in the residuals, I typed: >> >> anketest, wn(merge2) wf(Stata) model(iv-sar) // test for spatial autocorrelation in the residuals >> >> I then received the following error message: >> >> classdef _b_stat() in use >> (nothing dropped) >> (160 lines skipped) >> >> (error occurred while loading anketest.ado) >> >> r(310); >> end of do-file >> >> Here is a description of r(310): > >> [P] error . . . . . . . . . . . . . . . . . . . . . . . . Return code 310 >> not possible because object(s) in use; >> This can occur with mata describe and mata drop and indicates >> that the objects referred to cannot be described or eliminated >> because an earlier iteration of Mata is currently using them. >> >> Any ideas on what this means and how to fix it? >> >> Thanks, >> Jane >> >> >> >> -- >> Jane L. Harrison, PhD Candidate >> Forest Social Science, Oregon State University >> [email protected] I have pinned down the problem. A new version of -anketest- that fixes the issue will be made available for download shortly. But, in the meantime, Jane can check with me off-list for a quick solution. Regards, Wilner ________________________________ P. Wilner Jeanty, PhD Rice University, Houston, Texas Phone: (713) 348-3114 Email: [email protected]
Comment