I've made a multiple linear regression model using 'Fit model'. I have 7 independent variable and 1 dependent variable in my model. I have saved the prediction formula in the dataset, so each time a user enters values for independent variables the model predicts value for dependent variable in the dataset itself.
Is there any way in JMP I can design a custom form or dashboard out of this prediction formula where a dialogue box asks user to enter all values and it displays the final predicted value. The reason I'm trying to implement this is to have a user friendly output, so instead of editing the dataset every time, the user can only look at the dashboard and have the output displayed to them.
Thanks in advance.
That would not be too difficult. Do you have experience with JSL? Here's a simple example with 3 factors and a model y = 10 + 3*x1 - 1.2*x2 + 0.4*x3 - 0.3*x1^2.
New Window("Model Predictions",
V List Box(
Panel Box("Model Inputs",
Lineup Box(2,
Text Box("X1"),
x1_b = Number Edit Box(),
Text Box("X2"),
x2_b = Number Edit Box(),
Text Box("X3"),
x3_b = Number Edit Box(),
)
),
ok_btn = Button Box("Update Prediction", update_y),
H List Box(
Text Box("Prediction: "),
y_b = Text Box(".");
)
)
);
update_y = function({},
x1 = x1_b << Get;
x2 = x2_b << Get;
x3 = x3_b << Get;
y = 10 + 3*x1 - 1.2*x2 + 0.4*x3 - 0.3*x1^2;
y_b << Set Text(char(y));
);
What you can do is have JMP produce the formula for you in the table, and pretty much copy/paste into a function like my update_y() function. Instead of the coefficients being multiplied with columns in your table, just swap in the variables you create in your application. If you have categorical factors, you can have them select levels from a combo box or radio box.