Re: [R] Sensitivity Analysis for Moderated Mediation?
This post actually has nothing to do with R programming per se, and hence is off topic here. Please post elsewhere, e.g. on stats.stackexchange.com or other list that discusses "mediation models". Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Mon, Dec 5, 2016 at 5:00 AM, Dominik Wysswrote: > Dear group, > medsens() is a fantastic method for testing sensitivity of mediation models > estimated by the mediate(). (mediation package by Tingley et al; Version > 4.4.5). > However, I'm wondering whether medsens() is also appropriate for moderated > mediation? And if not, is there an alternative procedure that allows to test > sensitivity of moderated mediation analysis? > > In one of my study, I find strong theoretical and empirical support for > moderated mediation (moderator is a dummy var; otherwise the model specs are > similar to chapter 3.2 > ftp://cran.r-project.org/pub/R/web/packages/mediation/vignettes/mediation.pdf). > However, my medsens() analysis finds only very poor Rho and R2 values. > Before throwing away the model, I wonder whether medsens is appropriate for > estimating sensitivity of moderated mediation models, normally entailing a > moderation*mediator interaction term. > > And if medsens is not appropriate for moderated mediation: Would it be > enough enlightening to test sensitivity of two unmoderated mediation models > ran over two sub-datasets, split along the moderation dummy? > > many thanks for any advice. > Dominik > > __ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.
[R] Sensitivity Analysis for Moderated Mediation?
Dear group, medsens() is a fantastic method for testing sensitivity of mediation models estimated by the mediate(). (mediation package by Tingley et al; Version 4.4.5). However, I'm wondering whether medsens() is also appropriate for moderated mediation? And if not, is there an alternative procedure that allows to test sensitivity of moderated mediation analysis? In one of my study, I find strong theoretical and empirical support for moderated mediation (moderator is a dummy var; otherwise the model specs are similar to chapter 3.2 ftp://cran.r-project.org/pub/R/web/packages/mediation/vignettes/mediation.pdf). However, my medsens() analysis finds only very poor Rho and R2 values. Before throwing away the model, I wonder whether medsens is appropriate for estimating sensitivity of moderated mediation models, normally entailing a moderation*mediator interaction term. And if medsens is not appropriate for moderated mediation: Would it be enough enlightening to test sensitivity of two unmoderated mediation models ran over two sub-datasets, split along the moderation dummy? many thanks for any advice. Dominik __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.
[R] Sensitivity analysis - minimum effect size detectable by a binomial test
Hi all, I have performed a binomial test to verify if the number of males in a study is significantly different from a null hypothesis (say, H0:p of being a male= 0.5). For instancee: binom.test(10, 30, p=0.5, alternative=two.sided, conf.level=0.95) Exact binomial test data: 10 and 30 number of successes = 10, number of trials = 30, p-value = 0.09874 alternative hypothesis: true probability of success is not equal to 0.5 95 percent confidence interval: 0.1728742 0.5281200 sample estimates: probability of success 0.333 This way I get the estimated proportion of males (in this case p of success) that is equal to 0.33 and an associated p-value (this is not significant at alpha=0.05 with respect to the H0:P=0.5). Now, I want to know, given a power of, say, 0.8, alpha=0.05 and the above sample size (30), what is the minimum proportion of males as low or as high (two sided) like to be significantly detected with respect to a H0 (not necessarily H0:P=0.5 - I am interested also in other null hypotheses). In other words, I would have been able to detect a significant deviation from the H0 for a given power, alpha and sample size if the proportion of males would have been more than Xhigh or less than Xlow. I have had a look at the pwr package but it seems to me it doesn't allow to calculate this. I would appreciate very much any suggestion. [[alternative HTML version deleted]] __ R-help@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.
Re: [R] Sensitivity analysis - minimum effect size detectable by a binomial test
On Feb 5, 2014, at 10:05 AM, Simone misen...@hotmail.com wrote: Hi all, I have performed a binomial test to verify if the number of males in a study is significantly different from a null hypothesis (say, H0:p of being a male= 0.5). For instancee: binom.test(10, 30, p=0.5, alternative=two.sided, conf.level=0.95) Exact binomial test data: 10 and 30 number of successes = 10, number of trials = 30, p-value = 0.09874 alternative hypothesis: true probability of success is not equal to 0.5 95 percent confidence interval: 0.1728742 0.5281200 sample estimates: probability of success 0.333 This way I get the estimated proportion of males (in this case p of success) that is equal to 0.33 and an associated p-value (this is not significant at alpha=0.05 with respect to the H0:P=0.5). Now, I want to know, given a power of, say, 0.8, alpha=0.05 and the above sample size (30), what is the minimum proportion of males as low or as high (two sided) like to be significantly detected with respect to a H0 (not necessarily H0:P=0.5 - I am interested also in other null hypotheses). In other words, I would have been able to detect a significant deviation from the H0 for a given power, alpha and sample size if the proportion of males would have been more than Xhigh or less than Xlow. I have had a look at the pwr package but it seems to me it doesn't allow to calculate this. I would appreciate very much any suggestion. Take a look at ?power.prop.test, where you can specify that one of the proportions is NULL, yielding the value you seek: power.prop.test(n = 30, p1 = 0.5, p2 = NULL, power = 0.8, sig.level = 0.05) Two-sample comparison of proportions power calculation n = 30 p1 = 0.5 p2 = 0.834231 sig.level = 0.05 power = 0.8 alternative = two.sided NOTE: n is number in *each* group The value for 'p2' is your high value for the detectible difference from a proportion of 0.5, given the other parameters. 1 - p2 would be your low value. Regards, Marc Schwartz __ R-help@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.
[R] Sensitivity Analysis
Hi all, Do nnet, neuralnet or RSNNS implemented any kind of sensitivity analysis? Best Wishes, -- Prof. Gilson Correia de Carvalho, M.Sc. Pesquisador Associado Laboratório de Ecologia Bentônica - LEB Instituto de Biologia - UFBA Universidade Federal da Bahia - UFBA Professor Assistente Departamento de Biointeração Instituto de Ciências da Saúde - ICS Universidade Federal da Bahia - UFBA - Diretor Técnico Holos Soluções Ambientais Ltda - Skype: bio_gilson GTalk: biogilson [[alternative HTML version deleted]] __ R-help@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.
Re: [R] Sensitivity Analysis
Hi all, Do nnet, neuralnet or RSNNS implemented any kind of sensitivity analysis? Best Wishes, Em 22 de abril de 2013 11:46, Gilson Carvalho biogil...@gmail.comescreveu: Hi all, Do nnet, neuralnet or RSNNS implemented any kind of sensitivity analysis? Best Wishes, -- Prof. Gilson Correia de Carvalho, M.Sc. Pesquisador Associado Laboratório de Ecologia Bentônica - LEB Instituto de Biologia - UFBA Universidade Federal da Bahia - UFBA Professor Assistente Departamento de Biointeração Instituto de Ciências da Saúde - ICS Universidade Federal da Bahia - UFBA - Diretor Técnico Holos Soluções Ambientais Ltda - Skype: bio_gilson GTalk: biogilson -- Prof. Gilson Correia de Carvalho, M.Sc. Pesquisador Associado Laboratório de Ecologia Bentônica - LEB Instituto de Biologia - UFBA Universidade Federal da Bahia - UFBA Professor Assistente Departamento de Biointeração Instituto de Ciências da Saúde - ICS Universidade Federal da Bahia - UFBA - Diretor Técnico Holos Soluções Ambientais Ltda - Skype: bio_gilson GTalk: biogilson [[alternative HTML version deleted]] __ R-help@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.
[R] Sensitivity analysis in case of correlated inputs
Dear All, There are two packages which can be used for sensitivtiy analysis when the predictor variables are correlated. a: pcc (partial correlation coefficient) in R sensitivity package b: varimp in R party package (conditional importance) Are other R packages available for sensitivity anlaysis to handle the correlated inputs? Thanks, Jim __ R-help@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.
Re: [R] Sensitivity analysis - looking a tool for epidemiologic research
Thanks for the reply. I am aware of those packages, as well as of a few others (epiR, epinet, epibasix, epicalc). Unfortunately, they don't do this. I'll try to get in touch with the authors of the Stata package, who knows. Regards, D.C. -Message d'origine- De : MacQueen, Don [mailto:macque...@llnl.gov] Envoyé : 30 janvier 2012 18:19 À : Dominic Comtois; r-help@r-project.org Objet : Re: [R] Sensitivity analysis - looking a tool for epidemiologic research R has several packages for epidemiology. Maybe one of them has it. Take a look. To name just two: Epi and epitools -Don -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 On 1/27/12 9:01 PM, Dominic Comtois dominic.comt...@gmail.com wrote: Stata users can rely on the very neat Episens package for sensitivity analysis. Briefly, it allows one to specify a diagnostic tool's sensitivity and specificity and take those into account when estimating a risk ratio, for instance. A full description of the package is available at http://www.stata-journal.com/sjpdf.html?articlenum=st0138 http://www.stata-journal.com/sjpdf.html?articlenum=st0138 Anyone aware of a similar package in R? Thanks DC [[alternative HTML version deleted]] __ R-help@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. __ R-help@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.
Re: [R] Sensitivity analysis - looking a tool for epidemiologic research
R has several packages for epidemiology. Maybe one of them has it. Take a look. To name just two: Epi and epitools -Don -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 On 1/27/12 9:01 PM, Dominic Comtois dominic.comt...@gmail.com wrote: Stata users can rely on the very neat Episens package for sensitivity analysis. Briefly, it allows one to specify a diagnostic tool's sensitivity and specificity and take those into account when estimating a risk ratio, for instance. A full description of the package is available at http://www.stata-journal.com/sjpdf.html?articlenum=st0138 http://www.stata-journal.com/sjpdf.html?articlenum=st0138 Anyone aware of a similar package in R? Thanks DC [[alternative HTML version deleted]] __ R-help@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. __ R-help@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.
[R] Sensitivity analysis - looking a tool for epidemiologic research
Stata users can rely on the very neat Episens package for sensitivity analysis. Briefly, it allows one to specify a diagnostic tool's sensitivity and specificity and take those into account when estimating a risk ratio, for instance. A full description of the package is available at http://www.stata-journal.com/sjpdf.html?articlenum=st0138 http://www.stata-journal.com/sjpdf.html?articlenum=st0138 Anyone aware of a similar package in R? Thanks DC [[alternative HTML version deleted]] __ R-help@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.
[R] Sensitivity Analysis: Morris method - argument scale
Dear R-users, I have a question on the logical argument scale in the morris-function from the sensitivity package. Should it be set to TRUE or FALSE? Thanks, Chris [[alternative HTML version deleted]] __ R-help@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.
[R] sensitivity analysis with external simulation model - decoupling in package sensitivity or alternative?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi I hava a simulation model, of which I want to do a sensitivity analysis. I have identified a number of input variables and my response variable. What I hava done so far: 1) I created a Latin Hypercube with the lhs package (10.000 simulations) 2) simulated these and now I have a data frame with the input parameter and the response variable. I looked around and found the package sensitivity which seems to be the most suitable for my case. As the model is not in R, I have to use the decoupling approach. But now I am stuck: How can I do this? An example highlighting how to do the decoupling to do a sensitivity analysis, would be very much appreciated. Alternatively, ids there a different approach I could take? Thanks, Rainer - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1MCYQACgkQoYgNqgF2egof/gCfR3GuJChsPf34N4wFpFSzAdx2 zc4AmwUkIM83rffU+6dV8ZwNTfd23pcg =tv8r -END PGP SIGNATURE- __ R-help@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.
[R] sensitivity analysis, input factors
Hi, I'm trying to conduct sensitivity analysis in R using the 'sensitivity' package. Although the description of functions seem straightforward, I can’t succeed. The definition of input factors can be the problem. library(sensitivity) #A simple model with 4 input factor to test the morris function: model01=function(a1,a2,a3,a4) { Z-numeric(10) Z[1]-runif(1) Z[2]-runif(1,a1,30) Z[3]-6*runif(1,min(a1,a2),max(a1,a3)) Z[4]-runif(1,2,5)*runif(1,min(a2,a4),max(a2,a4)) Z[5]-0.5*runif(1,min(a3,a4),max(a3,a4)) Z[6]-2*runif(1,min(a1,a4),max(a1,a4)) Z[7]-runif(1) Z[8]-2*runif(1,min(2*a1,5*a4),max(10*a1,100*a4)) Z[9]-2.5*runif(1,min(a2,a3),max(a2,a3)) Z[10]-rnorm(1,10*a1,1) mean(Z) } xx=morris(model = model01, factors=c(a1,a2,a3,a4), r=4, design=list(type=oat, levels = 5, grid.jump = 3), binf =1,bsup=20, scale=F) Error message suggests that the second input factor is not used How should I define the input factors? Thanks in advance, Mark __ R-help@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.
Re: [R] sensitivity analysis, input factors
Hi Szalai I had used only src function, and on that case you need to have a vector with your Y variable, and a data-frame with all your X (i.e. explanatory) variables. I have interest on stay in touch with others that have been using sensitivity package! bests milton On Tue, Apr 13, 2010 at 11:08 AM, Szalai Márk szalai.m...@mkk.szie.huwrote: Hi, I'm trying to conduct sensitivity analysis in R using the 'sensitivity' package. Although the description of functions seem straightforward, I cant succeed. The definition of input factors can be the problem. library(sensitivity) #A simple model with 4 input factor to test the morris function: model01=function(a1,a2,a3,a4) { Z-numeric(10) Z[1]-runif(1) Z[2]-runif(1,a1,30) Z[3]-6*runif(1,min(a1,a2),max(a1,a3)) Z[4]-runif(1,2,5)*runif(1,min(a2,a4),max(a2,a4)) Z[5]-0.5*runif(1,min(a3,a4),max(a3,a4)) Z[6]-2*runif(1,min(a1,a4),max(a1,a4)) Z[7]-runif(1) Z[8]-2*runif(1,min(2*a1,5*a4),max(10*a1,100*a4)) Z[9]-2.5*runif(1,min(a2,a3),max(a2,a3)) Z[10]-rnorm(1,10*a1,1) mean(Z) } xx=morris(model = model01, factors=c(a1,a2,a3,a4), r=4, design=list(type=oat, levels = 5, grid.jump = 3), binf =1,bsup=20, scale=F) Error message suggests that the second input factor is not used How should I define the input factors? Thanks in advance, Mark __ R-help@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.htmlhttp://www.r-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]] __ R-help@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.
Re: [R] sensitivity analysis, input factors
Hi Milton, Thanks for your rapid answer. As far as I know the src is a regression based method and can be separated from model evaluations. However, a screening method like Morris requires that the input factors of latter model evaluations would be determined by the results of previous evaluations. Thus, there is no vector of responses (and data frame of factors) before the sensitivity analysis itself. Bests, Mark - Eredeti levél (Original Message) - Feladó: milton ruser milton.ru...@gmail.com Dátum: Kedd, Április 13, 2010 5:16 du Tárgy: Re: [R] sensitivity analysis, input factors Címzett: Szalai Márk szalai.m...@mkk.szie.hu Másolat: r-help@r-project.org Hi Szalai I had used only src function, and on that case you need to have a vector with your Y variable, and a data-frame with all your X (i.e. explanatory) variables. I have interest on stay in touch with others that have been using sensitivity package! bests milton On Tue, Apr 13, 2010 at 11:08 AM, Szalai Márk szalai.m...@mkk.szie.huwrote: Hi, I'm trying to conduct sensitivity analysis in R using the 'sensitivity' package. Although the description of functions seem straightforward, I cant succeed. The definition of input factors can be the problem. library(sensitivity) #A simple model with 4 input factor to test the morris function: model01=function(a1,a2,a3,a4) { Z-numeric(10) Z[1]-runif(1) Z[2]-runif(1,a1,30) Z[3]-6*runif(1,min(a1,a2),max(a1,a3)) Z[4]-runif(1,2,5)*runif(1,min(a2,a4),max(a2,a4)) Z[5]-0.5*runif(1,min(a3,a4),max(a3,a4)) Z[6]-2*runif(1,min(a1,a4),max(a1,a4)) Z[7]-runif(1) Z[8]-2*runif(1,min(2*a1,5*a4),max(10*a1,100*a4)) Z[9]-2.5*runif(1,min(a2,a3),max(a2,a3)) Z[10]-rnorm(1,10*a1,1) mean(Z) } xx=morris(model = model01, factors=c(a1,a2,a3,a4), r=4, design=list(type=oat, levels = 5, grid.jump = 3), binf =1,bsup=20, scale=F) Error message suggests that the second input factor is not used How should I define the input factors? Thanks in advance, Mark __ R-help@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.htmlhttp://www.r- project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]] __ R-help@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.
[R] sensitivity analysis
Hello list, I am performing a sensitivity analysis using the package ROCR. I am using the class prediction in this aim. My question is, could anyone tell me what the vector cutoffs represent in the result? Thank you all, Eleni [[alternative HTML version deleted]] __ R-help@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.
Re: [R] sensitivity analysis
Eleni Christodoulou elenichri at gmail.com writes: I am performing a sensitivity analysis using the package ROCR. I am using the class prediction in this aim. My question is, could anyone tell me what the vector cutoffs represent in the result? As the docs say: cutoffs: A list in which each element is a vector of all necessary cutoffs. Each cutoff vector consists of the predicted scores (duplicates removed), in descending order. Dieter __ R-help@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.