I have been attempting to create Derivatives of a Response Surface Model with JSL for some time now. The lack of documentation and forum posts here only pointing toward the manual creation of derivatives have not solved my issue. I already have a Fit, and the Prediction Formula saved to a column of the data table. What I'd like to do is use JSL to create the symbolic derivative of the formula and apply it to another column. So far the following code are all the different ways I have attempted to solve this issue to no avail.
// Get Formula
//formula = col << Get Formula;
formula = Expr((-211374703.282551) + 30.8532207444449 * :X1);
Show( formula );
// Make derivative
derivative = Derivative(formula, X1);
Show(derivative);
derivative = Derivative(formula, :X1);
Show(derivative);
derivative = Derivative(formula, "X1");
Show(derivative);
derivative = Derivative(formula, ":X1");
Show(derivative);
derivative = Derivative(formula, Column(:X1));
Show(derivative);
derivative = Derivative(Eval(formula), X1);
Show(derivative);
derivative = Derivative(formula, Eval(X1));
Show(derivative);
derivative = Derivative(Eval(formula), Eval(X1));
Show(derivative);
derivative = Derivative(Expr(formula), X1);
Show(derivative);
derivative = Derivative(formula, Expr(X1));
Show(derivative);
derivative = Derivative(Expr(formula), Expr(X1));
Show(derivative);
And the output I get is
formula = (-211374703.282551) + 30.8532207444449 * :X;
derivative = 0;
derivative = 0;
derivative = .;
derivative = .;
derivative = .;
derivative = 0;
derivative = .;
derivative = .;
derivative = 0;
derivative = .;
derivative = .;
Typically the formula is being extracted from the column holding the saved prediction formula, and in this case the printout does successfully show the formula.
What am I missing here? I thought this would be a straight-forward process.
Thanks for any help you might be able to give!