about sobol2002 sensitivity method

Skip to first unread message

hana waga

Oct 31, 2019, 1:23:36 AM10/31/19
to hydroma...@googlegroups.com
hi how are you?
i use sobol2002 for sensitivity analysis which have two mesures a first-order sensitivity index and a total sensitivity index. but i need anly inorder to measure a sensitivity of four rainfall runoff models namely, IHACRES_CWI ,IHACRES_CMD GR4J  and AWBM. when i use 
# a gain of samples from the parameter sets
n <- 1000
# Find the parameter ranges from your model
# Make sure you define the right model!
X1 <- hydromad::parameterSets(getFreeParsRanges(dmody),n)
X2 <- hydromad::parameterSets(getFreeParsRanges(dmody),n)
# run the sensitivity
cm <- sobol2002(model = evalPars,
              # using these parameter ranges
               X1 = X1, X2 = X2,
              # relates to the boot strapping in the analysis
               nboot = 100,
              # The model to use
              # The objective function to use

both measures are desplay

sobol2002(model = evalPars, X1 = X1, X2 = X2, nboot = 100, object = wmod,     objective = ~hmadstat("r.squared")(Q, X))

Model runs: 7000

First order indices:
        original          bias std. error   min. c.i.  max. c.i.
tw    0.28315064  0.0039998922 0.10168815  0.05889264 0.47335592
f     0.03454740  0.0017048688 0.02792947 -0.03010949 0.08094929
tau_s 0.03240779  0.0095650946 0.06490069 -0.11337796 0.15394195
v_s   0.36057461 -0.0010769543 0.08716641  0.20435177 0.55149404
tau_q 0.06478449  0.0006725721 0.03769932 -0.01995087 0.13772147

Total indices:
          original         bias std. error    min. c.i.  max. c.i.
tw     0.343931601 -0.007191064 0.09325466  0.174822883 0.53162276
f     -0.007130158 -0.001698604 0.02951521 -0.059275505 0.06529394
tau_s  0.192021305 -0.005224342 0.06186857  0.063911156 0.31227424
v_s    0.529243827  0.011284257 0.08655102  0.317865031 0.69202420
tau_q  0.082840863 -0.001366429 0.04424592  0.001479365 0.18021432

the plot also display both main and total effects 
but i need only total effect how to correct?

Willem Vervoort

Oct 31, 2019, 5:31:18 AM10/31/19
to hydromad-users
Hi Hana,
This is really not a Hydromad question as this is the package "sensitivity" and not hydromad.
Anyway, the help files says (under "Value")

sobol2002 returns a list of class "sobol2002", containing all the input arguments detailed before, plus the following components:

the matched call.
a data.frame containing the design of experiments.
the response used
the estimations of Variances of the Conditional Expectations (VCE) with respect to each factor and also with respect to the complementary set of each factor ("all but Xi").
the estimations of the Sobol' first-order indices.
the estimations of the Sobol' total sensitivity indices.

So the output is a list and cm$T or cm[["T"]] should give you your desired output


You received this message because you are subscribed to the Google Groups "hydromad users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hydromad-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hydromad-users/CAOmnh4smM8wLnNW9pd%3D%2BLLuzcRKtGP4QfnzOGo5E0caxqGOOGA%40mail.gmail.com.

hana waga

Nov 2, 2019, 2:53:01 AM11/2/19
to hydroma...@googlegroups.com
 thank you Willem for your continuous feedback.

Reply all
Reply to author
0 new messages