Subscribe Bookmark RSS Feed

How to create conditional formula for costs with categorical ingredients

bwanders

Community Trekker

Joined:

Sep 20, 2013

I have attached an example mixture design with one categorical factor for one of the ingredients.  How would I create a formula to compute the total cost of the formula when it depends on which type of ingredient is used?

If X1 is type A, the total cost is $1/kg x % X1 + $0.50/kg x % X2 + $0.75/kg x X3

If X2 is type B, the total cost is $2/kg x % X1 + $0.50/kg x % X2 + $0.75/kg x X3

If X3 is type C, the total cost is $3/kg x % X1 + $0.50/kg x % X2 + $0.75/kg x X3

Then I would be able to use the prediction formula for targeted costs.

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

Thank you, Karen. 

2 REPLIES
KarenC

Super User

Joined:

Feb 10, 2013

There is a matching formula in JMP that would work great if you are looking at 3 formulas based on X1 Type (which is what your table suggests but not your post).

Copy and paste this into a column formula:

Match(:X1 Type, "A", :X1 + 0.5 * :X2 + 0.75 * :X3, "B", 2 * :X1 + 0.5 * :X2 + 0.75 * :X3, "C", 3 * :X1 + 0.5 * :X2 + 0.75 * :X3, Empty(), Empty())

Solution

Thank you, Karen.