Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

- JMP User Community
- :
- Discussions
- :
- Build custom form/dashboard in JMP based on regression model

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Mar 4, 2020 11:48 AM
(843 views)

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.

1 ACCEPTED SOLUTION

Accepted Solutions

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

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.

-- Cameron Willden

1 REPLY 1

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

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.

-- Cameron Willden

Article Labels

There are no labels assigned to this post.