I'm having a bit of trouble specifying a formula in the optimal.cutpoints()
function of the OptimalCutpoints
package in R.
The information about the function states that X is:
either a character string with the name of the diagnostic test variable (then method 'optimal.cutpoints.default' is called), or a formula (then method 'optimal.cutpoints.formula' is called). When 'X' is a formula, it must be an object of class "formula".
I can't figure out how I apply this in in the function as I keep getting errors. I have tried a number of different variations
X = variable1 + variable2 + variable3
X = ("variable1", "variable2", "variable3")
X = ("variable1" + "variable2" + "variables3")
None of this seems to work. Is anyone familiar with how to code this into that function?