11annah / CompInt

https://11annah.github.io/CompInt/
2 stars 1 forks source link

g_theta (make_linear_predictor): RI name is not sufficiently distinctive #1

Open 11annah opened 8 months ago

11annah commented 8 months ago

When creating the linear predictor of the g_theta function, I am currently renaming the regressor of interest into "RI". Unfortunately, this is an issue if either

  1. RI or
  2. the name of the regressor of interest (such as age)

appears within the name of another regressor...

The function is currently stored in in utils.R

11annah commented 8 months ago

Currently, I have attempted to solve this with the error message stop(paste0("The name of the regressor(s) '",paste(regs[contained], collapse=" & "),"' is fully contained within another regressor name.\nUnfortunately, this is incompatible with the CompInt package's functionality.\nPlease rename the regressor(s) accordingly."))

Maybe we could add an automatic rename feature though?