This is an updated PR since it's probably cleaner to have just the intended commit(s) and accidentally closed the previous one.
The brm() argument inits is a deprecated alias of its init argument that produces a warning when ordbetareg() is called. This is annoying and it's best to avoid deprecated arguments. This pull request aims to fix this, although you'll need to additionally update the documentation accordingly with roxygen or whatever you use for it.
While both the warning and reliance on a deprecated argument are resolvable by passing values from the ordbetareg() argument inits to the init argument of brms functions, this would create confusing inconsistency in the names of arguments across brms and ordbetareg. Changing the ordbetareg() argument from inits to init also could break previous code fitting models with ordbetareg(). This PR aims to not break previous code while eliminating the warning/reliance on deprecated argument inits of brm().
I do this by renaming the inits argument for ordbetareg() to init (preserving its default value of "0") and creating a new argument inits that is NULL by default. If inits is not NULL (because the user passed it an object), the changes assign those values to init. This ensures that previous code passing values to inits still works. I then pass the init object to the brm()init argument. This eliminates the error message while ensuring the default/primary argument for initializing values within ordbetareg() has the same name as the primary, non-deprecated brm() argument.
This is an updated PR since it's probably cleaner to have just the intended commit(s) and accidentally closed the previous one.
The
brm()
argumentinits
is a deprecated alias of itsinit
argument that produces a warning whenordbetareg()
is called. This is annoying and it's best to avoid deprecated arguments. This pull request aims to fix this, although you'll need to additionally update the documentation accordingly with roxygen or whatever you use for it.While both the warning and reliance on a deprecated argument are resolvable by passing values from the
ordbetareg()
argumentinits
to theinit
argument ofbrms
functions, this would create confusing inconsistency in the names of arguments acrossbrms
andordbetareg
. Changing theordbetareg()
argument frominits
toinit
also could break previous code fitting models withordbetareg()
. This PR aims to not break previous code while eliminating the warning/reliance on deprecated argumentinits
ofbrm()
.I do this by renaming the
inits
argument forordbetareg()
toinit
(preserving its default value of "0") and creating a new argumentinits
that is NULL by default. Ifinits
is not NULL (because the user passed it an object), the changes assign those values toinit
. This ensures that previous code passing values toinits
still works. I then pass theinit
object to thebrm()
init
argument. This eliminates the error message while ensuring the default/primary argument for initializing values withinordbetareg()
has the same name as the primary, non-deprecatedbrm()
argument.