Closed moritzpschwarz closed 3 years ago
gets
packageIn this branch, I have tried to add a few, in my mind useful, S3 Methods
isat
and arx
into S3 methodsgets.isat
, arx.isat
, and isat.arx
lm
models i.e. isat.lm
, gets.lm
, and arx.lm
To enable the S3 methods I have had to make a number of changes, including to:
NAMESPACE
where I: gets-isat-source.R
where I: isat
by converting the existing isat
to isat.default
and then adding an isat
function with a UseMethod
command. $aux
list of the isat
object with the name of arguments
, which incorporates all arguments of each function - independent of whether they have explicitly been called or whether they are the default value and independent of which level of sys.call
they represent.print.searchinfo
behaviour (see below).gets-base-source.R
where I: arx
by converting the existing arx
to arx.default
and then adding an arx
function with a UseMethod
command. $aux
list of the getsm
and arx
object with the name of arguments
, which incorporates all arguments of each function - independent of whether they have explicitly been called or whether they are the default value and independent of which level of sys.call
they represent. Note: I opted not to change anything in getsv
, but this could be standardised across functions.getsm
and arx
robustified the check regarding the user.estimator
, which had been relying on call
. This worked fine without the S3 methods, but with the S3 methods the call element is more difficult to deal with. The argument now relies on the new $aux$arguments
information. Note: I opted not to change anything in getsv
, but this could be standardised across functions.I added two new files, the file gets-lm-S3.R
where the code of the new S3 methods lies and additionally, I have added a test file for these new methods called test-gets-test09-S3-lm.R
isat
, I changed the logical argument that is currently supplied to the dropvar
function. The dropvar
function takes the logical argument silent
, to which the variable print.searchinfo
is supplied. print.searchinfo
, however, is TRUE
when more output is wanted i.e. when it is not intended to be silent. Therefore the message of dropping of variable is shown when print.searchinfo = FALSE
rather than print.searchinfo = TRUE
. The function therefore was changed from dropvar(mXis, tol=tol, LAPACK=LAPACK,silent=print.searchinfo)
to dropvar(mXis, tol=tol, LAPACK=LAPACK,silent=!print.searchinfo)
Working on S3 methods for
lm
models and other S3 methods.