I want to build a model that determines whether to pre-screen my widgets for defects. If I do pre-screen, it costs a fixed amount per check and I resolve the problem 100% of the time. If I don't pre-screen, its cost will be the cost of fixing the problem, plus the cost of materials for expired inventory. I have a whole bunch of variables that impact whether a defect will occur in each particular widget, but if it does occur and I didn't pre-screen it, it will definitely result in a fixed repair cost and a variable expired inventory cost based on cost of materials. For each widget, I need to know if the expected cost of the defect exceeds or is less than the cost of pre-screening.
Things I know:
- A - Cost of pre-screening
- B - Model to Predict Whether it will fail - based on test data - of ones it says it won't have a defect, it is right 98.5% of the time (false negatives).
- C -Model to Predict expected cost of Raw Materials for each widget produced
- D - % of repairs that will be successful and result in no expired inventory cost
- E - Fixed Cost of Repairs
Therefore, I should screen if:
A - B*(E+C*D) > 0
I have all of these pieces, but I don't know how to build this into a model.
Anyone with R or Stata skills, I would appreciate being pointed in the direction of a good package to use for building this model.