Skip to content

Question regarding nlmixr2:::covarSearchAuto() #89

@NingJia012

Description

@NingJia012

#51 (comment)
Hey! Recently, I ran into a similar issue as mentioned in the link while using SCM to select covariates. I had an nlmixr object named fit.1cpt.ode.focei. Then when I run

rxode2::.rxWithWd(tempdir(), {# with temporary directory
auto1 <- nlmixr2extra:::covarSearchAuto(fit.1cpt.ode.focei, varsVec = c("cl", "eta.cl"),
covarsVec = c("WT"))
}),

an error will occur and the error message is as follows:

── starting forward search...──────────────────────────────────────────────────────────────────────────
error while ADDING covariate
Error in backwardSearch(varsVec, covarsVec, catvarsVec, fitorig = fit, : cannot find the object 'fit'

After running fit <- fit.1cpt.ode.focei, calling nlmixr2extra:::covarSearchAuto again proceeded normally without any errors. However, when the fit object exists in the R workspace, even if I use fit.1cpt.ode.focei as the parameter when calling nlmixr2extra:::covarSearchAuto, the code still runs normally without errors. Once I remove fit from the workspace, the error "cannot find the object 'fit'" reappears.
Additionally, I've noticed that even after loading the nlmixr2extra package, I cannot directly use the covarSearchAuto() function—it does not appear in the help documentation, and only nlmixr2extra:::covarSearchAuto() runs without errors. Therefore, I would like to ask: is the SCM method currently ready for use, or is it still in a testing phase or something similar? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions