tag:blogger.com,1999:blog-3240271627873788873.post8009845369029909155..comments2024-03-26T06:46:11.752-04:00Comments on Doing Bayesian Data Analysis: Sinusoidal trend and global warming UPDATEDJohn K. Kruschkehttp://www.blogger.com/profile/17323153789716653784noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-3240271627873788873.post-82163485915036646542019-07-20T13:16:07.144-04:002019-07-20T13:16:07.144-04:00global warming is the increase in the average temp...<br /><br /><a href="http://http://airpopulation.unblog.fr/2019/07/15/air-pollution/" rel="nofollow">global warming</a> is the increase in the average temperature of the Earth's near-surface air and the oceans ever since the mid-twentieth century and its projected continuation.stevehttps://www.blogger.com/profile/09103945663126239724noreply@blogger.comtag:blogger.com,1999:blog-3240271627873788873.post-67848852016113551202019-05-10T00:00:00.956-04:002019-05-10T00:00:00.956-04:00I fit your model in both Stan and JAGS multiple ti...<br />I fit your model in both Stan and JAGS multiple times on my laptop and clocked the times. (I was using your post as an excuse to mess around with JAGS for the first time.) <br /><br />Stan:<br />5-10 minutes<br />4000 post-warmup draws<br />ESS ranged from ~2800 for `nu` to ~3500 for `amp` <br /><br />JAGS:<br />16-20 minutes <br />12000 saved steps<br />ESS ranged from ~2100 for `nu` to ~7600 for `beta0`<br /><br />In both cases I ran 4 cores in parallel. For Stan I used the settings displayed in the posted script. I'm unfamiliar with JAGS so I just used your settings without altering them. <br /><br /><br />Peter Phalenhttps://www.blogger.com/profile/03610458624914310809noreply@blogger.comtag:blogger.com,1999:blog-3240271627873788873.post-91915495591550366772019-05-09T20:35:27.046-04:002019-05-09T20:35:27.046-04:00Cool. So which takes longer to run, JAGS or Stan? ...Cool. So which takes longer to run, JAGS or Stan? (all else being equal, of course, like number of parallel processors, and ESS of resulting chains)John K. Kruschkehttps://www.blogger.com/profile/17323153789716653784noreply@blogger.comtag:blogger.com,1999:blog-3240271627873788873.post-62532374177784829812019-05-09T20:27:01.726-04:002019-05-09T20:27:01.726-04:00I translated your model into stan for some reason!...I translated your model into stan for some reason! <br /><br /><a href="https://www.peterphalen.com/temp/WisconsinTempAR1Stan.R" rel="nofollow">R script here</a>. <br /><br /><a href="https://www.peterphalen.com/temp/wisconsin_temp_stan.png" rel="nofollow">Picture of script output</a>.<br /><br />Very cool! Thank you for sharing.Peter Phalenhttps://www.blogger.com/profile/03610458624914310809noreply@blogger.comtag:blogger.com,1999:blog-3240271627873788873.post-5677815935981642772018-11-17T09:40:20.601-05:002018-11-17T09:40:20.601-05:00You are confronting a fundamental issue in statist...You are confronting a fundamental issue in statistical methods, namely 'model selection'. There are tomes written on the topic of model selection, also known as model comparison. Chapter 10 of DBDA2E discusses one Bayesian approach. A case of model selection, namely variable selection in multiple regression, is discussed in Section 18.4 of DBDA2E. But for frequentist approaches and other Bayesian approaches, you'll have to explore the literature. In particular, it sounds like you are interested in something called 'cross validation'.John K. Kruschkehttps://www.blogger.com/profile/17323153789716653784noreply@blogger.comtag:blogger.com,1999:blog-3240271627873788873.post-91097479717136431512018-11-17T02:47:23.043-05:002018-11-17T02:47:23.043-05:00Thanks I understand much better now. I appreciate ...Thanks I understand much better now. I appreciate your book a lot, I come from a NHST background and avoided Bayesian for many years because I thought it was complicated till I saw your book. Sorry for posting here but I dont know any other way to connect with you.<br /><br />I wanted to ask another question. I am working on something which requires me to generate hypothesis or test from the data itself. So, if I have the data D, I split it into D1 and D2. Using D1 I generate pattern using the apriori search algorithm, which generates a lot of interesting patterns (or hypothesis). I then test them using a Bayesian model on the D2 (which is a separate dataset). One thing I find is that there is a lot of correlation in the patterns. <br /><br />Let say dataset has a X1 --- XN and Y variable. Y is dichotomous , i.e. either 0 or 1 . I generate several patterns using apriori algorithm (P1 ... PN). each P is some combination of Xs. Patterns are correlated . e.g. for a row in D2 has P1 / P2 present. How do I structure the data for this? Do I have to separate the data for each Pattern so that they are mutually exclusive? That is if the a row is D1 has both P1 and P2 , can I include that as a datapoint for P1 and P2 separately? Apologies if I am not making a lot of sense.Anonymoushttps://www.blogger.com/profile/18360664709416993027noreply@blogger.comtag:blogger.com,1999:blog-3240271627873788873.post-2964129749204889442018-11-16T07:00:48.270-05:002018-11-16T07:00:48.270-05:00First, to alert other readers so there is no confu...First, to alert other readers so there is no confusion, this question has absolutely nothing to do with the blog post. It's not even a question about Bayesian methods, it's a question about NHST. Now, on to the question. Your question is actually quite general, and is central to controlling for multiple tests in NHST. The issue is what should be the set or family of tests over which the error rate is controlled? Should it be all the tests done on one "batch" of data? Or, as is conventional in ANOVA, should there be separate families for every main effect and every type of interaction? Or, should it be all the tests one scientist does in a lifetime? Please see more discussion in Section 11.4 of DBDA2E, which is devoted to this topic.John K. Kruschkehttps://www.blogger.com/profile/17323153789716653784noreply@blogger.comtag:blogger.com,1999:blog-3240271627873788873.post-56971979567968526222018-11-15T23:57:49.899-05:002018-11-15T23:57:49.899-05:00Dear John, I am going through you book and its ver...Dear John, I am going through you book and its very interesting. I have a couple of questions though. In your example learning of filteration and condensation. You quote that example in the NHST chapter as an example of multiple comparison. As I understood from the description filteration/condensation example all data is independent. You are asking the the same subjects to learn different group but the data is separate for each group, G1,G2, G3, G4. How is that multiple comparison? I though multiple comparison as quoted in NHST is either multiple tests on the same data or same test on multiple data ? Isn't your example as good a 4 separate test on 4 different data?<br /><br />Your comments will be greatly appreciated.Anonymoushttps://www.blogger.com/profile/18360664709416993027noreply@blogger.com