Add an option to enforce the same parameter on monotonic effects
Related to #924, is it possible to restrict two monotonic effects to have both the same shape parameter (which is possible with the "id" specification) and the same effect parameter (b). The setting would be a situation where you have two structures x and y that you believe contribute the same effect (e.g., ax + ay). In a linear regression formula statement this can be specified as I(x+y). I would like to impose monotonicity on both of these structures, and use a specification like I(mo(x, id="s") + mo(y, id="s")) to restrict both the shape and effect parameter to be the same for both of these structures. I am currently getting the error The monotonic term I(mo(x, id="s") + mo(y, id="s")) is invalid. Possible to implement this in the formula statement somehow?
Doesn't mo(I(x+y)) do this? If not, you could always just define a new column in your input data and populate it with the values x + y.
Since x and y need to be ordered factors to include as monotonic predictors I can't use the definition x+y directly either in the formula specification or by creating a new variable in the data set.
silly me, sorry for the noise. Note that I doesn't mean "force equality of coefficients" but rather "isolate the expression and evaluate using standard R syntax and not formula-specific syntax".
It is not yet possible but may become possible in the future as part of a general equal() prior option.