1
$\begingroup$

I have a model which predicts contamination levels of nurses' hands after touching surfaces. It depends on 4 variables: surface contamination (V), hand contact area (A), transfer efficiency of germs ($\lambda$) and hand hygiene efficacy (h): \begin{equation}Y \sim f(\lambda, V, A,h)\end{equation}

Where: \begin{equation} h=LN~(1.5,0.1),\end{equation} \begin{equation} \lambda=\Gamma(15,3),\end{equation} \begin{equation} A=LN~(7,1.9),\end{equation} \begin{equation} V=LN~(2.5,1.9),\end{equation}

I ran a Monte Carlo simulation to produce 10000 values of Y. But I'd like to work out which of my variables has the most effect on Y. In other words I want to work out whether hand hygiene efficacy is more important than surface cleanliness.

Can Soboljansen in R deal with data input instead of the actual model? If so could you show me how please as I've not got it to so far.

$\endgroup$
8
  • $\begingroup$ Could you give some more details about the research situation and the model on which you're trying to conduct the sensitivity analysis (i.e., the contents of sobol.fun)? $\endgroup$ Apr 11, 2013 at 13:17
  • $\begingroup$ Updated question: if you had an idea of a good example to work through I'd appreciate the hint. The model is run in matlab through montecarlo sampling, but I'm told R is perfect for doing the sensitivity analysis. $\endgroup$
    – HCAI
    Apr 11, 2013 at 13:35
  • $\begingroup$ I'm not really familiar with the soboljansen function, so I can't help you with specifics. However, from the soboljansen help file, I assume that you specify how to handle the categorical variable through what you pass to the model argument. So, if you want type of care to be represented using dummy codes and if you want to model interaction terms between care and your other variables, you would either write a function that modeled care in that way or fit a model that included those terms. You would then pass that function / model object to soboljansen during your function call. $\endgroup$ Apr 11, 2013 at 17:10
  • $\begingroup$ By the way, I don't see from your description how you want to represent type of care (ACTid). $\endgroup$ Apr 11, 2013 at 17:10
  • $\begingroup$ @PatrickS.Forscher Thank you. care type is direct care(1), housekeeping(2), mealtimes(3), medication(4), miscellaneous (5) and personal care (6). ACTid is the type of care for each row of Y. so eg ACTid(Y(1))=6. ie nurse 1 did personal care. Do you mean I will need to recode my entire Monte-carlo model in R? Can I not use my data files and tell R the interaction between input and output parameters is: $Y_i=A_iV_i\lambda_i-\beta_iY_{i-1}$? $\endgroup$
    – HCAI
    Apr 11, 2013 at 17:50

2 Answers 2

1
$\begingroup$

Using your sample:

  1. look at the scatterplots of Y as function of the inputs, it will already give you lot of information.
  2. if the dependence is monotonous, calculate the spearman correlation coefficient between Y and the inputs. The sensitivity coefficient is approximately the square of the correlation coefficient.
  3. if not, you will need more complex methods, such a sobol or variance gradients.
$\endgroup$
0
$\begingroup$

I don't know a package you mentioned, but what you can do as well is to check "importance" of variables the same way it's done in random forests or boosted trees. Firstly, choose appropriate loss function (if your Y is continuous, one common choice is RMSE; for categorical variables you can take multiclass logloss). After that, take each variable, and check increase/decrease of your loss function after permuting it - if the loss is huge, it means that the levels of your variable are important for your prediction.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.