Marino David
2013-Jun-07 22:54 UTC
[R] It seams that fast99 function (sensitivity package) does not work out for norm distribution.
Dear all mailing listers, Does Anyone have the same problem as mine when using the fast99 (extended-FAST method) to perform SA of model with norm distribution inputs? See the simple example given following. Any suggestion will be greatly appreciated. Thank you! Marino # Simple example # 1. uniform version (It works well) library(sensitivity) Myfun<-function(x){return(rowSums(x))} SA1 <- fast99(model = Myfun, factors = 3, n = 1000, q = "qunif", q.arg list(min = 0, max = 1))> SA1Call: fast99(model = Myfun, factors = 3, n = 1000, q = "qunif", q.arg list(min = 0, max = 1)) Model runs: 3000 Estimations of the indices: first order total order X1 0.3335243 0.3350584 X2 0.3335243 0.3350584 X3 0.3335243 0.3350584 # 2. norm version (it does not work) SA2 <- fast99(model = Myfun, factors = 3, n = 1000, q = "qnorm", q.arg list(mean = 0, sd = 1))> SA2Call: fast99(model = Myfun, factors = 3, n = 1000, q = "qnorm", q.arg list(mean = 0, sd = 1)) Model runs: 3000 Estimations of the indices: first order total order X1 NA NA X2 NA NA X3 NA NA [[alternative HTML version deleted]]
Uwe Ligges
2013-Jun-09 15:49 UTC
[R] It seams that fast99 function (sensitivity package) does not work out for norm distribution.
On 08.06.2013 00:54, Marino David wrote:> Dear all mailing listers, > > Does Anyone have the same problem as mine when using the fast99 > (extended-FAST method) to perform SA of model with norm distribution inputs?Why not ask the authors of the function? Best, Uwe Ligges> > See the simple example given following. > > Any suggestion will be greatly appreciated. > > Thank you! > > Marino > > > # Simple example > > # 1. uniform version (It works well) > library(sensitivity) > Myfun<-function(x){return(rowSums(x))} > SA1 <- fast99(model = Myfun, factors = 3, n = 1000, q = "qunif", q.arg > list(min = 0, max = 1)) > > >> SA1 > Call: > fast99(model = Myfun, factors = 3, n = 1000, q = "qunif", q.arg > list(min = 0, max = 1)) > > Model runs: 3000 > > Estimations of the indices: > first order total order > X1 0.3335243 0.3350584 > X2 0.3335243 0.3350584 > X3 0.3335243 0.3350584 > > > > > > > # 2. norm version (it does not work) > SA2 <- fast99(model = Myfun, factors = 3, n = 1000, q = "qnorm", q.arg > list(mean = 0, sd = 1)) > > >> SA2 > Call: > fast99(model = Myfun, factors = 3, n = 1000, q = "qnorm", q.arg > list(mean = 0, sd = 1)) > > Model runs: 3000 > > Estimations of the indices: > first order total order > X1 NA NA > X2 NA NA > X3 NA NA > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >