<?xml version="1.0" encoding="UTF-8"?>
<rss  xmlns:atom="http://www.w3.org/2005/Atom" 
      xmlns:media="http://search.yahoo.com/mrss/" 
      xmlns:content="http://purl.org/rss/1.0/modules/content/" 
      xmlns:dc="http://purl.org/dc/elements/1.1/" 
      version="2.0">
<channel>
<title>Gianluca Baio&#39;s webpage</title>
<link>https://gianluca.statistica.it/blog/</link>
<atom:link href="https://gianluca.statistica.it/blog/index.xml" rel="self" type="application/rss+xml"/>
<description></description>
<generator>quarto-99.9.9</generator>
<lastBuildDate>Fri, 16 Feb 2024 09:11:43 GMT</lastBuildDate>
<item>
  <title>Measuring the effect of the hostile environment policy</title>
  <dc:creator>Gianluca Baio</dc:creator>
  <link>https://gianluca.statistica.it/blog/2024-02-16-hostile-environmnent/</link>
  <description><![CDATA[ 
<!-- This creates a site-wide situation -- if privacy is set on a page it persists across the website -->
<div id="ucl-consent-ui"></div>
<script>
window.uclConsentSettings = {
  persistConsent: true,    // keeps consent in localStorage
  autoHideBanner: true     // hide banner after consent
};
</script>

<!-- This blocks the cookies and complies with regulation -->
<script src="../../js/ucl-consent.blocker.min.js?v=1758018871"></script>
<script src="../../js/ucl-consent.ui-full.min.js?v=1758019745"></script>




<script src="../../js/ucl-consent.blocker.min.js"></script>
<script src="../../js/ucl-consent.ui-full.min.js"></script>




<div class="callout callout-style-default callout-note callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Note
</div>
</div>
<div class="callout-body-container callout-body">
<p>This post is syndicated from <a href="https://sample-space.org/posts/features/2024-02-16-hostile-environment/">Sample Space</a>, the magazine of the UCL Department of Statistical Science</p>
</div>
</div>
<p>In 2012, the UK Government announced a series of immigration policy reforms known as the <a href="https://en.wikipedia.org/wiki/Home_Office_hostile_environment_policy">hostile environment policy</a>, culminating in the so-called <a href="https://www.bbc.co.uk/news/uk-43782241">Windrush scandal</a>. Several hundred Commonwealth citizens who had settled legally in the UK since World War II were falsely identified as “undocumented” and, in many cases, deported. This situation particularly affected people from Black Caribbean backgrounds who had legally immigrated to the UK in the previous decades, known as the “Windrush Generation”, from the name of one of the ships used to carry people, mostly from Jamaica to England.</p>
<p>This work is part of a research grant funded by the Wellcome Trust under the “<a href="https://wellcome.org/grant-funding/schemes/collaborative-awards-science">Collaborative Award</a>” scheme. The project, called “Evaluating Policy Implementations TO Predict MEntal health [EPITOME]: a Bayesian hierarchical framework for quasi-experimental designs in longitudinal settings” aims at developing methodology to draw causal inference (or as close as possible to that!…) for longitudinal data, accounting for their hierarchical nature, the existence of time series components and spatial and spatio-temporal correlation.</p>
<p>Methodologically, the main idea is to use “quasi-experimental” designs, such as the “<a href="https://en.wikipedia.org/wiki/Interrupted_time_series">Interrupted Time Series</a>”, to robustly rule out the impacts of potential confounders or biases in the assessment of changes in a particular outcome before and after a certain policy is introduced. In this specific case, we have data on nearly 60,000 participants in the <a href="https://www.understandingsociety.ac.uk/">UK Household Longitudinal Study</a>, a large survey conducted at multiple time points and collecting a wide range of variables, including a widely used, self-administered questionnaire on psychological distress, the <a href="https://www.mrc.soton.ac.uk/sws/files/2016/12/Initial-GHQ-12-Q.pdf">12-item General Health Questionnaire</a> (GHQ-12). The details of the methodology are available <a href="https://www.sciencedirect.com/science/article/pii/S2215036623004121">here</a>.</p>
<p>Specifially, we have investigated the impact of the “Immigration Act 2014”, requiring landlords, employers, the NHS, banks and the police to check right-to-stay documentation, which was a key part of the Home Office hostile environment policy, seeking to target people without leave to remain in the UK. We also investigated the impact of the Windrush scandal, after news reports from late 2017 onwards documented how the UK government had, over the preceding decades, been wrongly detaining British subjects who had come over from the Caribbean or threatening them with deportation.</p>
<p>Our model analysis shows an increase in psychological distress in people of Black Caribbean heritage in the UK after 2014, relative to White study participants. This difference was a one-point decline on mental wellbeing on a scale of 1-36, which is slightly larger than the declines in mental health seen across the whole UK population at the time of the first Covid-19 lockdown, but, unlike the lockdown impact, the increased psychological distress in the Black Caribbean population persisted for several years. Black Caribbean study participants then experienced a further increase in psychological distress relative to the White population after the Windrush scandal. Further analysis revealed that the 2014 Act affected first generation Black Caribbean migrants more, while media coverage of the Windrush scandal affected British people of Caribbean heritage more.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="https://gianluca.statistica.it/blog/2024-02-16-hostile-environmnent/fig-paper.jpg" class="img-fluid figure-img"></p>
<figcaption>The effects of the hostile environment policy on mental ill health across different ethnic groups compared with people of White ethnicity. Source: <a href="https://www.sciencedirect.com/science/article/pii/S2215036623004121">Jefferey et al (2024)</a>.</figcaption>
</figure>
</div>
<p>In the figure above, green data points and lines represent mean GHQ-12 scores from the respective ethnic minority groups; black data points and lines represent mean GHQ-12 scores from the White ethnicity group. The red dashed line shows the implementation of the Immigration Act 2014 and the blue dashed line shows the start of the Windrush scandal media coverage. GHQ-12=General Health Questionnaire 12-item version. Our model did account for spatial correlation (based on the area in which respondents live), as well as the time trend.</p>
<p>Our study highlights the harms to mental health that the government’s hostile environment policy had on certain groups of people, in addition to other well-documented harms such as deportation, job loss, eviction, and discrimination. The mental health impacts may have stemmed from the direct impacts of such threats to people’s homes and livelihoods, but could also have resulted from a wider, pervasive sense of racial injustice and bias, faced by a group already experiencing systemic and sometimes institutionalised racism and discrimination. When the Windrush scandal dominated the news, there may have been a risk of retraumatisation for some people, while even for those not directly affected, the scandal put the spotlight on people with minoritised ethnic backgrounds.</p>
<p>Government policies can produce, maintain and exacerbate systemic inequities in mental health. Policymakers should consider the mental health impact of immigration policies, as they can impact not only prospective immigrants or people without leave to remain, but also those who are already settled legally in the country, and thus they should design them to minimise all harms including mental health inequalities. And appropriate statistical modelling and analysis can help uncover all this and improve decision-making and governmental action based on evidence.</p>
<!--
This files first derives the relative path to the folder under which the page to share on selected social media is stored. 
Then it creates a series of sharing buttons --- currently implemented:
- Twitter
- Email
- LinkedIn
- Whatsapp
Others are fairly easy to create --- only need the fa icon of the relevant media + the combination of text that would be required
to automatically share in on that platform
-->
<br>
<center>
<!-- This uses a trick and an external widget to share on any of the federated servers on Mastodon
   see: https://shkspr.mobi/blog/2022/06/create-a-share-to-mastodon-button-for-wordpress/
-->
<a href="https://toot.kytta.dev/?text=Measuring%20the%20effect%20of%20the%20hostile%20environment%20policy%20https://gianluca.statistica.it/blog/2024-02-16-hostile-environmnent" target="_blank" onclick="window.open(this.href,'targetWindow','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=400px,height=600px'); return false;"><i class="fa-brands fa-mastodon fa-lg" title="Share on Mastodon" style="color:#383838" aria-label="mastodon"></i></a> &nbsp; <a href="https://twitter.com/intent/tweet?url=https://gianluca.statistica.it/blog/2024-02-16-hostile-environmnent/&amp;text=Measuring%20the%20effect%20of%20the%20hostile%20environment%20policy" target="_blank"><i class="fa-brands fa-twitter fa-lg" title="Share on Twitter" style="color:#383838" aria-label="twitter"></i></a> &nbsp; <a href="mailto:?subject=Measuring%20the%20effect%20of%20the%20hostile%20environment%20policy&amp;body=https://gianluca.statistica.it/blog/2024-02-16-hostile-environmnent" target="_blank"><i class="fa-solid fa-envelope fa-lg" title="Share by email" style="color:#383838" aria-label="envelope"></i></a> &nbsp; <a href="https://www.linkedin.com/shareArticle?url=https://gianluca.statistica.it/blog/2024-02-16-hostile-environmnent/&amp;title=Measuring%20the%20effect%20of%20the%20hostile%20environment%20policy" target="_blank"><i class="fa-brands fa-linkedin fa-lg" title="Share on LinkedIn" style="color:#383838" aria-label="linkedin"></i></a> &nbsp; <a href="https://web.whatsapp.com/send?text=Measuring%20the%20effect%20of%20the%20hostile%20environment%20policyhttps://gianluca.statistica.it/blog/2024-02-16-hostile-environmnent/" target="_blank"><i class="fa-brands fa-whatsapp fa-lg" title="Share on Whatsapp" style="color:#383838" aria-label="whatsapp"></i></a> &nbsp; <a href="https://reddit.com/submit?url=https://gianluca.statistica.it/blog/2024-02-16-hostile-environmnent/&amp;title=Measuring%20the%20effect%20of%20the%20hostile%20environment%20policy" target="_blank"><i class="fa-brands fa-reddit fa-lg" title="Share on Reddit" style="color:#383838" aria-label="reddit"></i></a>
</center>



 ]]></description>
  <category>Bayesian statistics</category>
  <guid>https://gianluca.statistica.it/blog/2024-02-16-hostile-environmnent/</guid>
  <pubDate>Fri, 16 Feb 2024 09:11:43 GMT</pubDate>
</item>
<item>
  <title>Research, teaching and nuclear disasters</title>
  <dc:creator>Gianluca Baio</dc:creator>
  <link>https://gianluca.statistica.it/blog/2023-09-12-research-teaching-nuclear-disasters/</link>
  <description><![CDATA[ 
<!-- This creates a site-wide situation -- if privacy is set on a page it persists across the website -->
<div id="ucl-consent-ui"></div>
<script>
window.uclConsentSettings = {
  persistConsent: true,    // keeps consent in localStorage
  autoHideBanner: true     // hide banner after consent
};
</script>

<!-- This blocks the cookies and complies with regulation -->
<script src="../../js/ucl-consent.blocker.min.js?v=1758018871"></script>
<script src="../../js/ucl-consent.ui-full.min.js?v=1758019745"></script>




<script src="../../js/ucl-consent.blocker.min.js"></script>
<script src="../../js/ucl-consent.ui-full.min.js"></script>




<p>This is probably going to be a <em>very</em> boring post, if anything because I do this so seldom, nowadays, that surely I’ve forgotten how to write blog posts (assuming I’ve ever done this competently, I hear you say…).</p>
<p>Anyhow: the other reason why this is probably going to bore the <a href="https://getyarn.io/yarn-clip/1ac87b20-63dc-4dfc-90a3-84eda2e4abcf">bejesus out of you</a> is that I am very aware (and increasingly so) that, since starting my job as head of the department, things have changed. Before, when I talked to people about work, no doubt somebody will have felt like I was the most boring person on earth and “<em>I mean… come on, man — <strong>nobody</strong> cares about <a href="../../research/voi">value of information</a>!</em>”<sup>1</sup>. But I would also get a whole spectrum of responses, from very encouraging “<em>Oh — this is really important then. You tell the Government what they should fund!</em>” (not really, but: sure!), to hopeful “<em>OK so we’re going to win the next <a href="../../research/eurovision">Eurovision</a>, then?</em>”, occasionally all the way to technical people lighting up and going “<em>wow: this is really cool!</em>”.</p>
<p>Now, when friends (especially those who <em>don’t</em> work in academia) ask me about work, I usually sigh and prepare to see their will to live simply drying up, while they wonder why on earth they had to be polite and ask <em>that</em> question to the guy with the most boring work problems in the world. And I don’t blame them — except that, while I do realise that I sound boring while I talk about them, I don’t find them boring day-to-day. Sometimes “frustrating” or even “infuriating” are a good description. But basically never “boring”, for me — which perhaps tells you already all there is to know… And to complicate things even further, the link from 👆 this to 👇 that is not necessarily so direct — but if you’re patient for a little longer, I’ll also bring Chernobyl into this…</p>
<p>The thing is: maybe it’s just me, but until I started having serious managerial responsibility (as the HoD of a department that <strong>consistently</strong> returns no less than 60-65% of our income back to the centre; which, at this level, you can only do trough teaching…), I hadn’t really appreciated the perfect balance that is needed between research and teaching activity, in an academic department/institution. Sure: I know that, philosophically, research <em>and</em> teaching make academia — and you could argue that you can’t do one without the other, to do both well, or even to serve the very purpose of working in a University (if you like to be pompous, which, <em>obviously</em>, I do). But I think what this truly means is that you really cannot separate yourself from the rest of your institution — by which I mostly mean “department”, here.</p>
<p>You want people to do great research, because, arguably, that’s the core of academia and, by and large, the very reason why the vast majority of people decide they want to work in a University<sup>2</sup>. So, as management, you try and create positive incentives for people to be able to have good ideas, apply for grant money and eventually do their research, generate impact, visibility, etc. And, in our system, this means that if somebody is successful, then they will probably use that success to “buy themselves out of teaching” — this isn’t preposterous: if you have a big grant, you’ll need to focus on that and therefore you can do without teaching a 10-week module with 300 students. But, again, the thing is, for a University to be alive, <em>somebody</em> must do that! Because yes: teaching <em>is</em> the primary source of income for a University — there’s a lot to say about this: I personally think that academia is a (very) poor-man version of <a href="https://en.wikipedia.org/wiki/Enron_scandal">Enron</a>. But, whatever: teaching <em>is</em> the primary source of income for a University.</p>
<p>The balance would be somehow restored if there were some freedom to trade-off a successful grant (which means people don’t contribute equally to teaching, because somebody buys themselves off it), with extra capacity, i.e., as HoD, I can “buy” somebody else’s time to cover the hole in my teaching allocation. Now: in reality, even this doesn’t <em>really</em> work 100%, I think — because if you’re really good and lucky, you get a grant in which you cover <img src="https://latex.codecogs.com/png.latex?x">% of your time. So somebody will pay for <img src="https://latex.codecogs.com/png.latex?x">% of your salary (well — not quite… overheads and all the rest, but: whatever…) so you can do what you want for <img src="https://latex.codecogs.com/png.latex?y"> years (oh: and in the process, I, your HoD, have promised you and the funder that you won’t have to teach, so you can concentrate on research. In fact, said HoD was being stingy and only promised to reduce your teaching load by giving you two Teaching Assistants to help with marking, but the reviewers didn’t like that and so you managed to completely get out of teaching!…).</p>
<p>But typically <img src="https://latex.codecogs.com/png.latex?y"> is what: 2, 3 years? And, more importantly, <img src="https://latex.codecogs.com/png.latex?x"> is what? At UCL, the rough guideline is that if you’re the principal investigator on a grant, you budget for something like 20% of your time — sometimes people are really good and get 100%-funded fellowships, but this isn’t for everybody or for every research project… So what happens is that my spare monetary capacity (assuming that I could use it freely) would not necessarily be enough to create an attractive post. Perhaps my department is good and I have 5 colleagues on 20% buy-out for the same 3 years, which means I can go to the centre and say, “<em>OK, can I use the money we’re saving (bar overheads) and hire a full time lecturer on a temporary contract for three years?</em>”. Even if they say “yes” (it never works like that…), then I’d have a pretty crappy job to offer — time-limited, little security, with a strong remit to cover my back with the teaching I can’t have others doing.</p>
<p>So, as HoD, the conundrum is that when somebody you told to apply actually gets a grant, you’re very happy for them <em>and</em> the department. But then you immediately start worrying about who’s paying the price for their colleague’s success; because <em>somebody</em> will have to cover up the teaching activity (which, by the way, is not just delivering a lecture… there’s summer projects, tutees meetings, other admin, etc) — and that’s what’s basically punched me in the face: the very strong realisation of this absolute inter-dependence, which, I think, often we just simply don’t understand, as “normal” academics.</p>
<p>Now: nuclear disasters. Last night I was re-watching the brilliant <a href="https://en.m.wikipedia.org/wiki/Chernobyl_(miniseries)">Chernobyl</a>. The main character <a href="https://en.m.wikipedia.org/wiki/Valery_Legasov">Valery Legasov</a> is a nuclear physicist tasked with the impossible job of mitigating the disaster<sup>3</sup>. In the last episode, Legasov testifies at the trial of the three people held responsible for the tragedy<sup>4</sup>; during the testimony, he explains how the nuclear reactor works in a way that I found dauntingly beautiful<sup>5</sup>.</p>
<p><img src="https://gianluca.statistica.it/blog/2023-09-12-research-teaching-nuclear-disasters/balance.jpg" class="img-fluid"></p>
<p>He lays red and blue cards on some shelves: red cards are factors increasing reactivity, while blue cards are those responsible for balancing this increase out, thus ensuring stability of the system. So for every red card in the mix, you need a counter-balancing blue card (he goes on to demonstrate how the chain of tragic events meant that first there were too many unchecked blue cards and that then, to counter that, the operators mistakenly removed all of them, which meant a basically infinite loop of red cards, which produced a ginormous amount of reactivity, which made the reactor explode).</p>
<p>As I was watching, I couldn’t help but thinking about research and teaching<sup>6</sup> — how they’re like a bunch of red and blue cards and how strong the “cross-subsidy” should be between the two — and especially across members of the same department.</p>
<!--
This files first derives the relative path to the folder under which the page to share on selected social media is stored. 
Then it creates a series of sharing buttons --- currently implemented:
- Twitter
- Email
- LinkedIn
- Whatsapp
Others are fairly easy to create --- only need the fa icon of the relevant media + the combination of text that would be required
to automatically share in on that platform
-->
<br>
<center>
<!-- This uses a trick and an external widget to share on any of the federated servers on Mastodon
   see: https://shkspr.mobi/blog/2022/06/create-a-share-to-mastodon-button-for-wordpress/
-->
<a href="https://toot.kytta.dev/?text=Research,%20teaching%20and%20nuclear%20disasters%20https://gianluca.statistica.it/blog/2023-09-12-research-teaching-nuclear-disasters" target="_blank" onclick="window.open(this.href,'targetWindow','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=400px,height=600px'); return false;"><i class="fa-brands fa-mastodon fa-lg" title="Share on Mastodon" style="color:#383838" aria-label="mastodon"></i></a> &nbsp; <a href="https://twitter.com/intent/tweet?url=https://gianluca.statistica.it/blog/2023-09-12-research-teaching-nuclear-disasters/&amp;text=Research,%20teaching%20and%20nuclear%20disasters" target="_blank"><i class="fa-brands fa-twitter fa-lg" title="Share on Twitter" style="color:#383838" aria-label="twitter"></i></a> &nbsp; <a href="mailto:?subject=Research,%20teaching%20and%20nuclear%20disasters&amp;body=https://gianluca.statistica.it/blog/2023-09-12-research-teaching-nuclear-disasters" target="_blank"><i class="fa-solid fa-envelope fa-lg" title="Share by email" style="color:#383838" aria-label="envelope"></i></a> &nbsp; <a href="https://www.linkedin.com/shareArticle?url=https://gianluca.statistica.it/blog/2023-09-12-research-teaching-nuclear-disasters/&amp;title=Research,%20teaching%20and%20nuclear%20disasters" target="_blank"><i class="fa-brands fa-linkedin fa-lg" title="Share on LinkedIn" style="color:#383838" aria-label="linkedin"></i></a> &nbsp; <a href="https://web.whatsapp.com/send?text=Research,%20teaching%20and%20nuclear%20disastershttps://gianluca.statistica.it/blog/2023-09-12-research-teaching-nuclear-disasters/" target="_blank"><i class="fa-brands fa-whatsapp fa-lg" title="Share on Whatsapp" style="color:#383838" aria-label="whatsapp"></i></a> &nbsp; <a href="https://reddit.com/submit?url=https://gianluca.statistica.it/blog/2023-09-12-research-teaching-nuclear-disasters/&amp;title=Research,%20teaching%20and%20nuclear%20disasters" target="_blank"><i class="fa-brands fa-reddit fa-lg" title="Share on Reddit" style="color:#383838" aria-label="reddit"></i></a>
</center>




<div id="quarto-appendix" class="default"><section id="footnotes" class="footnotes footnotes-end-of-document"><h2 class="anchored quarto-appendix-heading">Footnotes</h2>

<ol>
<li id="fn1"><p>In all fairness, the evidence is that too few people do care about it. But that’s a different story…↩︎</p></li>
<li id="fn2"><p>Other than the six weeks holidays, of course — although for that you can simply be a primary school teacher, I guess…↩︎</p></li>
<li id="fn3"><p>Well: I think he only has himself to blame. He was brought in to confirm that everything was, in fact, all right but he insisted that it was serious and they needed to do something to avoid humanity annihilation, so…↩︎</p></li>
<li id="fn4"><p>Although it seems that he didn’t actually take part in the trial, in real life.↩︎</p></li>
<li id="fn5"><p>As far as I can tell, it was also scientifically accurate — though <a href="https://www.youtube.com/watch?v=q3d3rzFTrLg">this</a>, I think, is a more “proper” and yet reasonably understandable explanation.↩︎</p></li>
<li id="fn6"><p>I did tell you I was boring…↩︎</p></li>
</ol>
</section></div> ]]></description>
  <category>Perso</category>
  <guid>https://gianluca.statistica.it/blog/2023-09-12-research-teaching-nuclear-disasters/</guid>
  <pubDate>Tue, 12 Sep 2023 07:03:44 GMT</pubDate>
</item>
<item>
  <title>Summary function in survhe</title>
  <dc:creator>Gianluca Baio</dc:creator>
  <link>https://gianluca.statistica.it/blog/2023-05-23-summary-function-in-survHE/</link>
  <description><![CDATA[ 
<!-- This creates a site-wide situation -- if privacy is set on a page it persists across the website -->
<div id="ucl-consent-ui"></div>
<script>
window.uclConsentSettings = {
  persistConsent: true,    // keeps consent in localStorage
  autoHideBanner: true     // hide banner after consent
};
</script>

<!-- This blocks the cookies and complies with regulation -->
<script src="../../js/ucl-consent.blocker.min.js?v=1758018871"></script>
<script src="../../js/ucl-consent.ui-full.min.js?v=1758019745"></script>




<script src="../../js/ucl-consent.blocker.min.js"></script>
<script src="../../js/ucl-consent.ui-full.min.js"></script>




<p>I’ve been made aware that in the whole restructuring I’ve done to <code>survHE</code> there was something that escaped my control and so there’s a tiny bug in the current <a href="https://cran.r-project.org/web/packages/survHE/index.html"><code>CRAN</code> version (2.0.1)</a>. The only function affected (he says… 😉) is <code>summary</code>, which is used to compute the mean survival time on a grid of time points. Because I had to rename one of the key variables stored in the object that is created in the background by the function <code>make.surv</code> (that generates the samples to perform the uncertainty analysis), the resulting table with the summary statistics for the mean survival time were all wrong (and all set to 0).</p>
<p>The fix was pretty easy, but thanks to Michalis Galanakis (who’s a MSc student at Athens University of Economics and Business) for alerting me to that!</p>
<p>The revised version of <code>survHE</code> available from the <a href="https://github.com/giabaio/survHE">GitHub repo</a> works fine and can be installed using the following command.</p>
<pre><code>remotes::install_github("giabaio/survHE")</code></pre>
<!--
This files first derives the relative path to the folder under which the page to share on selected social media is stored. 
Then it creates a series of sharing buttons --- currently implemented:
- Twitter
- Email
- LinkedIn
- Whatsapp
Others are fairly easy to create --- only need the fa icon of the relevant media + the combination of text that would be required
to automatically share in on that platform
-->
<br>
<center>
<!-- This uses a trick and an external widget to share on any of the federated servers on Mastodon
   see: https://shkspr.mobi/blog/2022/06/create-a-share-to-mastodon-button-for-wordpress/
-->
<a href="https://toot.kytta.dev/?text=Summary%20function%20in%20survhe%20https://gianluca.statistica.it/blog/2023-05-23-summary-function-in-survHE" target="_blank" onclick="window.open(this.href,'targetWindow','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=400px,height=600px'); return false;"><i class="fa-brands fa-mastodon fa-lg" title="Share on Mastodon" style="color:#383838" aria-label="mastodon"></i></a> &nbsp; <a href="https://twitter.com/intent/tweet?url=https://gianluca.statistica.it/blog/2023-05-23-summary-function-in-survHE/&amp;text=Summary%20function%20in%20survhe" target="_blank"><i class="fa-brands fa-twitter fa-lg" title="Share on Twitter" style="color:#383838" aria-label="twitter"></i></a> &nbsp; <a href="mailto:?subject=Summary%20function%20in%20survhe&amp;body=https://gianluca.statistica.it/blog/2023-05-23-summary-function-in-survHE" target="_blank"><i class="fa-solid fa-envelope fa-lg" title="Share by email" style="color:#383838" aria-label="envelope"></i></a> &nbsp; <a href="https://www.linkedin.com/shareArticle?url=https://gianluca.statistica.it/blog/2023-05-23-summary-function-in-survHE/&amp;title=Summary%20function%20in%20survhe" target="_blank"><i class="fa-brands fa-linkedin fa-lg" title="Share on LinkedIn" style="color:#383838" aria-label="linkedin"></i></a> &nbsp; <a href="https://web.whatsapp.com/send?text=Summary%20function%20in%20survhehttps://gianluca.statistica.it/blog/2023-05-23-summary-function-in-survHE/" target="_blank"><i class="fa-brands fa-whatsapp fa-lg" title="Share on Whatsapp" style="color:#383838" aria-label="whatsapp"></i></a> &nbsp; <a href="https://reddit.com/submit?url=https://gianluca.statistica.it/blog/2023-05-23-summary-function-in-survHE/&amp;title=Summary%20function%20in%20survhe" target="_blank"><i class="fa-brands fa-reddit fa-lg" title="Share on Reddit" style="color:#383838" aria-label="reddit"></i></a>
</center>



 ]]></description>
  <category>Bayesian statistics</category>
  <category>Health economics</category>
  <category>R</category>
  <category>Software</category>
  <guid>https://gianluca.statistica.it/blog/2023-05-23-summary-function-in-survHE/</guid>
  <pubDate>Tue, 23 May 2023 11:20:58 GMT</pubDate>
</item>
<item>
  <title>blendR — the package</title>
  <dc:creator>Gianluca Baio</dc:creator>
  <link>https://gianluca.statistica.it/blog/2022-12-11-blendr/</link>
  <description><![CDATA[ 
<!-- This creates a site-wide situation -- if privacy is set on a page it persists across the website -->
<div id="ucl-consent-ui"></div>
<script>
window.uclConsentSettings = {
  persistConsent: true,    // keeps consent in localStorage
  autoHideBanner: true     // hide banner after consent
};
</script>

<!-- This blocks the cookies and complies with regulation -->
<script src="../../js/ucl-consent.blocker.min.js?v=1758018871"></script>
<script src="../../js/ucl-consent.ui-full.min.js?v=1758019745"></script>




<script src="../../js/ucl-consent.blocker.min.js"></script>
<script src="../../js/ucl-consent.ui-full.min.js"></script>




<div style="float: left;margin-right: 20px;margin-top: -0px;margin-bottom:0px;">
<p><img src="https://gianluca.statistica.it/blog/2022-12-11-blendr/blender.gif" class="img-fluid"></p>
</div>
<p>We have some exciting updates from our work on <a href="https://journals.sagepub.com/doi/epub/10.1177/0272989X221134545">“blending survival curves”</a> for HTA — the paper is out in the print version of MDM, this week (though it’s come out as an e-print a little earlier in the year).</p>
<p>We have now a decent version of the companion package, which we aptly named <code>blendR</code> — <a href="https://n8thangreen.github.io/">Nathan</a> has found a nice logo for the package, though I somehow wished we could use the gif instead…</p>
<p>The package can be installed using <code>remotes</code> and its <a href="https://github.com/StatisticsHealthEconomics/blendR">GitHub repo</a> and I’ve written a relatively short explainer <a href="../../software/blendr/index.html">here</a>. In reality, it will be a fairly simple set of functions, because the blending process is basically just some algebra applied to two survival curves, to construct a synthesis that gives time-depending weights to the two components of the mixture…</p>
<p>But: we’re trying to make it as general as possible and with quite a few simplifying facilities for the user. For now, the basic inputs are in the form of fitted curves (to both the short-term data and some long-term process, which may be based on hard evidence or expert elicitation). But we allow these to be obtained through a range of useful packages (so all <a href="../../software/survhe/index.html"><code>survHE</code></a>’s flavours, but also <code>flexsurv</code> and potentially others too).</p>
<p>And the idea is to create all sorts of visualisation functions, like simple plots that automatically includes the blended curve, as well as depictions of the chosen weight functions and other bits and pieces which we are still working on — the package is fully functional, but we’re looking into further improvements… Vignettes and more examples to come shortly too!</p>
<!--
This files first derives the relative path to the folder under which the page to share on selected social media is stored. 
Then it creates a series of sharing buttons --- currently implemented:
- Twitter
- Email
- LinkedIn
- Whatsapp
Others are fairly easy to create --- only need the fa icon of the relevant media + the combination of text that would be required
to automatically share in on that platform
-->
<br>
<center>
<!-- This uses a trick and an external widget to share on any of the federated servers on Mastodon
   see: https://shkspr.mobi/blog/2022/06/create-a-share-to-mastodon-button-for-wordpress/
-->
<a href="https://toot.kytta.dev/?text=blendR%20---%20the%20package%20https://gianluca.statistica.it/blog/2022-12-11-blendr" target="_blank" onclick="window.open(this.href,'targetWindow','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=400px,height=600px'); return false;"><i class="fa-brands fa-mastodon fa-lg" title="Share on Mastodon" style="color:#383838" aria-label="mastodon"></i></a> &nbsp; <a href="https://twitter.com/intent/tweet?url=https://gianluca.statistica.it/blog/2022-12-11-blendr/&amp;text=blendR%20---%20the%20package" target="_blank"><i class="fa-brands fa-twitter fa-lg" title="Share on Twitter" style="color:#383838" aria-label="twitter"></i></a> &nbsp; <a href="mailto:?subject=blendR%20---%20the%20package&amp;body=https://gianluca.statistica.it/blog/2022-12-11-blendr" target="_blank"><i class="fa-solid fa-envelope fa-lg" title="Share by email" style="color:#383838" aria-label="envelope"></i></a> &nbsp; <a href="https://www.linkedin.com/shareArticle?url=https://gianluca.statistica.it/blog/2022-12-11-blendr/&amp;title=blendR%20---%20the%20package" target="_blank"><i class="fa-brands fa-linkedin fa-lg" title="Share on LinkedIn" style="color:#383838" aria-label="linkedin"></i></a> &nbsp; <a href="https://web.whatsapp.com/send?text=blendR%20---%20the%20packagehttps://gianluca.statistica.it/blog/2022-12-11-blendr/" target="_blank"><i class="fa-brands fa-whatsapp fa-lg" title="Share on Whatsapp" style="color:#383838" aria-label="whatsapp"></i></a> &nbsp; <a href="https://reddit.com/submit?url=https://gianluca.statistica.it/blog/2022-12-11-blendr/&amp;title=blendR%20---%20the%20package" target="_blank"><i class="fa-brands fa-reddit fa-lg" title="Share on Reddit" style="color:#383838" aria-label="reddit"></i></a>
</center>



 ]]></description>
  <category>Bayesian statistics</category>
  <category>Health economics</category>
  <category>R</category>
  <category>Software</category>
  <guid>https://gianluca.statistica.it/blog/2022-12-11-blendr/</guid>
  <pubDate>Sun, 11 Dec 2022 16:22:45 GMT</pubDate>
</item>
<item>
  <title>Oh, Vienna!</title>
  <dc:creator>Gianluca Baio</dc:creator>
  <link>https://gianluca.statistica.it/blog/2022-11-06-oh-vienna/</link>
  <description><![CDATA[ 
<!-- This creates a site-wide situation -- if privacy is set on a page it persists across the website -->
<div id="ucl-consent-ui"></div>
<script>
window.uclConsentSettings = {
  persistConsent: true,    // keeps consent in localStorage
  autoHideBanner: true     // hide banner after consent
};
</script>

<!-- This blocks the cookies and complies with regulation -->
<script src="../../js/ucl-consent.blocker.min.js?v=1758018871"></script>
<script src="../../js/ucl-consent.ui-full.min.js?v=1758019745"></script>




<script src="../../js/ucl-consent.blocker.min.js"></script>
<script src="../../js/ucl-consent.ui-full.min.js"></script>




<div style="float: left;margin-right: 20px;margin-top: -0px;margin-bottom:0px;">
<div class="quarto-video"><iframe data-external="1" src="https://www.youtube.com/embed/VVkHZz0WOqs" width="600" height="400" title="" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe></div>
</div>
<p>This week I’m in beatiful Vienna for <a href="https://www.ispor.org/conferences-education/conferences/upcoming-conferences/ispor-europe-2022">Ispor Europe</a>, which is always a big deal around HTA… The last two, of course, have been mainly online, which was OK — but ISPOR is a <strong>big</strong> conference, so having so many people online didn’t really work that well… Plus, it’s got a feeling of “reunion” to it — despite it being so big, once you go for you few times, there’s every chance you’ll know a million people next time…</p>
<p>The schedule is always busy — this time, I think I’ve taken it to the next level: we’re doing (we being me, <a href="https://pure.qub.ac.uk/en/persons/felicity-lamrock">Felicity Lamrock</a>, <a href="https://github.com/rhart1">Rose Hart</a> and <a href="https://www.bristol.ac.uk/people/person/Howard-Thom-7d5ace0c-a4eb-4fa0-8c0b-37dc141c0e9f/">Howard Thom</a>) a short <a href="https://github.com/rhart1/Health-Economic-Modeling-in-R_A-Hands-on-Introduction-">pre-conference course</a>. That is scheduled for a Sunday 8am! Which once you go past the very early start, it’s actually nice — and we have quite a few people (not just there pretending to be asleep — they’re actually asking questions!), which is very nice. My part was a quick run-through <a href="../../software/bcea">BCEA</a> — my slides are <a href="../../slides/ispor-2022/bcea">here</a>.</p>
<p>Then, I’m also in a panel, discussing the use of “real world evidence”. This is also very interesting and very much related to our paper on “<em>Blendend Survival</em>” curves, <a href="https://doi.org/10.1177/0272989X221134545">which</a> has just come out. Panels at ISPOR are usually very busy, so each one of us is doing a very quick presentation — my 5 slides are <a href="../../slides/ispor-2022/rwe">here</a>.</p>
<p>I had a quick look at the programme and there are a bunch of sessions I also look forward to going — including one where fellow <a href="https://www.convoi-group.org/">ConVOI-er</a> <a href="https://www.nataliakunst.com/">Natalia</a> will talk <a href="../../research/voi">VoI</a>. While I was coming in today, I saw this 👇 on a Vienna’s wall, which I thought was a nice sign…</p>
<p><img src="https://gianluca.statistica.it/blog/2022-11-06-oh-vienna/wall.jpg" class="img-fluid" style="width:35.0%"></p>
<!--
This files first derives the relative path to the folder under which the page to share on selected social media is stored. 
Then it creates a series of sharing buttons --- currently implemented:
- Twitter
- Email
- LinkedIn
- Whatsapp
Others are fairly easy to create --- only need the fa icon of the relevant media + the combination of text that would be required
to automatically share in on that platform
-->
<br>
<center>
<a href="https://twitter.com/intent/tweet?url=https://gianluca.statistica.it/blog/2022-11-06-oh-vienna/&amp;text=Oh,%20Vienna!" target="_blank"><i class="fa-brands fa-twitter fa-lg" title="Share on Twitter" style="color:#383838" aria-label="twitter"></i></a> &nbsp; <a href="mailto:?subject=Oh,%20Vienna!&amp;body=https://gianluca.statistica.it/blog/2022-11-06-oh-vienna" target="_blank"><i class="fa-solid fa-envelope fa-lg" title="Share by email" style="color:#383838" aria-label="envelope"></i></a> &nbsp; <a href="https://www.linkedin.com/shareArticle?url=https://gianluca.statistica.it/blog/2022-11-06-oh-vienna/&amp;title=Oh,%20Vienna!" target="_blank"><i class="fa-brands fa-linkedin fa-lg" title="Share on LinkedIn" style="color:#383838" aria-label="linkedin"></i></a> &nbsp; <a href="https://web.whatsapp.com/send?text=Oh,%20Vienna!https://gianluca.statistica.it/blog/2022-11-06-oh-vienna/" target="_blank"><i class="fa-brands fa-whatsapp fa-lg" title="Share on Whatsapp" style="color:#383838" aria-label="whatsapp"></i></a> &nbsp; <a href="https://reddit.com/submit?url=https://gianluca.statistica.it/blog/2022-11-06-oh-vienna/&amp;title=Oh,%20Vienna!" target="_blank"><i class="fa-brands fa-reddit fa-lg" title="Share on Reddit" style="color:#383838" aria-label="reddit"></i></a>
</center>



 ]]></description>
  <category>Bayesian statistics</category>
  <category>Health economics</category>
  <category>R</category>
  <guid>https://gianluca.statistica.it/blog/2022-11-06-oh-vienna/</guid>
  <pubDate>Sun, 06 Nov 2022 09:30:59 GMT</pubDate>
</item>
<item>
  <title>Another migration</title>
  <dc:creator>Gianluca Baio</dc:creator>
  <link>https://gianluca.statistica.it/blog/2022-10-10-another-migration/</link>
  <description><![CDATA[ 
<!-- This creates a site-wide situation -- if privacy is set on a page it persists across the website -->
<div id="ucl-consent-ui"></div>
<script>
window.uclConsentSettings = {
  persistConsent: true,    // keeps consent in localStorage
  autoHideBanner: true     // hide banner after consent
};
</script>

<!-- This blocks the cookies and complies with regulation -->
<script src="../../js/ucl-consent.blocker.min.js?v=1758018871"></script>
<script src="../../js/ucl-consent.ui-full.min.js?v=1758019745"></script>




<script src="../../js/ucl-consent.blocker.min.js"></script>
<script src="../../js/ucl-consent.ui-full.min.js"></script>




<p>This is the first post in a while, but also an important one, as it’s the first time I’m writing under the brand new incarnation of the website, after migrating from <a href="https://wowchemy.com/"><code>wowchemy</code></a> to <a href="https://quarto.org"><code>quarto</code></a>.</p>
<p>I started looking at <code>quarto</code> over the summer, when I was preparing my <a href="../../talks/vibass-2022/index.html">talk</a> at <a href="http://vabar.es/events/vibass5/">Vibass</a>, when I went to beautiful Valencia, last summer. I had reached a very high level of (probably even higher nerdy…) satisfaction with my <a href="https://github.com/yihui/xaringan"><code>xaringan</code></a> slides, which I still like very much. But I as I started to read about it, I thought <code>quarto</code> had some very nice features and, <strong>to some extent</strong>, it looked like a bit easier to manage as a whole environment. So I gave it a go and actually quite enjoyed hacking the basic presentation template to make it my own format.</p>
<p>Then, I started playing around with building websites using <code>quarto</code> — and after a very limited struggle to get my head around some of its features, I think it <em>is</em> fair to say that the management of the whole website is simpler using a single engine, rather than fiddling with <code>wowchemy</code>/<code>hugo</code> and then <code>blogdown</code> to render the whole thing.</p>
<p>Porting my old <code>wowchemy</code>/<code>hugo</code>/<code>blogdown</code> website has not been a <em>massive</em> amount of work… The worst part was to deal with blog posts, simply because I have quite a lot of them. But a little bit of Unix bash has helped a lot making sure that some common substitutions in the text of the various <code>.md</code> or <code>.Rmd</code> files was fairly automated (for instance, in <code>wowchemy</code>, I used to add <code>tags</code> to my posts, talks, etc, while <code>quarto</code> does it with <code>categories</code>. So I needed to do some clever use of <a href="https://en.wikipedia.org/wiki/Sed"><code>sed</code></a> to change all instances of <code>tags: ...</code> to <code>categories: ...</code>).</p>
<p>The other interesting thing I found is that, while <code>wowchemy</code> has been setup explicitly to do with academic websites (and so has a set of nice features hard-coded in how the various pages and widgets are rendered), in <code>quarto</code> I didn’t necessarily had that, automatically. But basically all of it could be dealt with by combining <code>R</code> code (which I could manipulate fairly easily) to <code>include{{&lt; ... &gt;}}</code> commands in <code>quarto</code> to add suitable code that would render in HTML the way I wanted.</p>
<p>For example, I can add the “social media” sharing buttons (like at the bottom of this page) by simply writing some <code>R</code> code that uses the icons and adds a <code>a href</code> tag with an automated reference to the relevant website page (using <code>here::here()</code>).</p>
<p>Another thing that, I think, has ended up being nicer than the <code>wowchemy</code> built in procedure is the rendering of the publications list. I now handle everything through pure <code>R</code> and <code>DT::datatable()</code>. I had to fiddle slightly with the underlying data (I did it by creating a <code>yaml</code> file with the information for all the papers/publications, which is closely linked to an overall <code>.bib</code> master bibliography file) and then I can create a highly queryable <a href="../../publications/index.html">table</a> (which looks like a “normal” list).</p>
<p>All in all, I like the look of things and I thought I was ready to make this the new “official” look of the website. I may fiddle with this once more as I go along and some of the pages may still need some more updating/polishing, but I think this is close to nerdy satisfaction…</p>
<!--
This files first derives the relative path to the folder under which the page to share on selected social media is stored. 
Then it creates a series of sharing buttons --- currently implemented:
- Twitter
- Email
- LinkedIn
- Whatsapp
Others are fairly easy to create --- only need the fa icon of the relevant media + the combination of text that would be required
to automatically share in on that platform
-->
<br>
<center>
<a href="https://twitter.com/intent/tweet?url=https://gianluca.statistica.it/blog/2022-10-10-another-migration&amp;text=Another%20migration"><i class="fa-brands fa-twitter fa-lg" title="Share on Twitter" style="color:#383838" aria-label="twitter"></i></a> &nbsp; <a href="mailto:?subject=Another%20migration&amp;body=https://gianluca.statistica.it/blog/2022-10-10-another-migration"><i class="fa-solid fa-envelope fa-lg" title="Share by email" style="color:#383838" aria-label="envelope"></i></a> &nbsp; <a href="https://www.linkedin.com/shareArticle?url=https://gianluca.statistica.it/blog/2022-10-10-another-migration&amp;title=Another%20migration"><i class="fa-brands fa-linkedin fa-lg" title="Share on LinkedIn" style="color:#383838" aria-label="linkedin"></i></a> &nbsp; <a href="https://web.whatsapp.com/send?text=Another%20migrationhttps://gianluca.statistica.it/blog/2022-10-10-another-migration"><i class="fa-brands fa-whatsapp fa-lg" title="Share on Whatsapp" style="color:#383838" aria-label="whatsapp"></i></a> &nbsp; <a href="https://reddit.com/submit?url=https://gianluca.statistica.it/blog/2022-10-10-another-migration&amp;title=Another%20migration"><i class="fa-brands fa-reddit fa-lg" title="Share on Reddit" style="color:#383838" aria-label="reddit"></i></a>
</center>



 ]]></description>
  <category>Perso</category>
  <guid>https://gianluca.statistica.it/blog/2022-10-10-another-migration/</guid>
  <pubDate>Mon, 10 Oct 2022 10:09:12 GMT</pubDate>
</item>
<item>
  <title>new BCEA</title>
  <dc:creator>Gianluca Baio</dc:creator>
  <link>https://gianluca.statistica.it/blog/2022-08-25-new-bcea/</link>
  <description><![CDATA[ 
<!-- This creates a site-wide situation -- if privacy is set on a page it persists across the website -->
<div id="ucl-consent-ui"></div>
<script>
window.uclConsentSettings = {
  persistConsent: true,    // keeps consent in localStorage
  autoHideBanner: true     // hide banner after consent
};
</script>

<!-- This blocks the cookies and complies with regulation -->
<script src="../../js/ucl-consent.blocker.min.js?v=1758018871"></script>
<script src="../../js/ucl-consent.ui-full.min.js?v=1758019745"></script>




<script src="../../js/ucl-consent.blocker.min.js"></script>
<script src="../../js/ucl-consent.ui-full.min.js"></script>




<p><a href="https://n8thangreen.github.io/">Nathan</a> and I — well the more correct version of this statement is “Nathan”… — have been working on a few relatively major improvements on <a href="../../software/bcea"><code>BCEA</code></a> and have managed to push all the changes to the main version, which is now available from <a href="https://cran.r-project.org/web/packages/BCEA/index.html"><code>CRAN</code></a>.</p>
<p>The changes are mainly of three types — some are probably just “cosmetics”, others are a bit more structural, like new features or just fixing bugs (the weird numbers-letters codes in brackets are pointers to the Git commit in which changes have happened). Some of the new features came out from exposure to people’s requests and comments when we were running our <a href="../../teaching/summer-school">Summer School</a>, but others are directly requests from users, which is pretty cool and we like that sort of thing…</p>
<p>Nathan has been doing a fantastic job in keeping track of all these, so we do have an updated list of all the changes (as below, but also in the <code>NEWS.md</code> file that gets saved into the main package).</p>
<p>Installation is, as usual, from CRAN</p>
<pre><code>install.packages("BCEA")</code></pre>
<p>which gives you the latest version (now 4.2.1).</p>
<section id="bug-fixes" class="level2">
<h2 class="anchored" data-anchor-id="bug-fixes">Bug fixes</h2>
<ul>
<li><code>summary.bcea()</code> wasn’t passing <code>wtp</code> argument to <code>sim_table()</code> internally (5440eb3)</li>
<li><code>summary()</code> was the same for basic <code>bcea</code> and <code>multi.ce</code> objects. Now has own <code>summary.pairwise()</code> method. (88ade51)</li>
<li><code>struct.psa()</code> output now works with <code>summary()</code> and plots all still work without having to use $ to get at <code>bcea</code> object as before. (b014c83)</li>
<li>Changed <code>wtp</code> argument in <code>bcea()</code> to <code>k</code> because <code>wtp</code> in the plotting functions refers to the wtp line and so is a scalar whereas <code>k</code> is a grid of points. Added an error message to use new argument. (b014c83)</li>
<li><code>bcea()</code> still allows a scalar <code>k</code> but added a warning that this will give empty plots.</li>
<li>Updated GitHub Actions for checking the package to use <code>r-lib/Actions</code> version 2. There was an error with not finding INLA but this was solved by Gabor at RStudio (see thread here https://community.rstudio.com/t/not-finding-inla-package-not-on-cran-in-actions/141398)</li>
<li>GrassmannOptim package r-release-macos-x86_64 isn’t available resulting in a CRAN check error and doesn’t appear to be maintained. Tried emailing the author but bounced. Removed dependency and copied <code>GrassmannOptim()</code> function inside of package with acknowledgement.</li>
</ul>
</section>
<section id="refactoring" class="level2">
<h2 class="anchored" data-anchor-id="refactoring">Refactoring</h2>
<ul>
<li>Now uses <code>Rdpack</code> for bibliography in documentation (229c96d)</li>
<li>The cost and health values in the <code>Smoking</code> and <code>Vaccine</code> data sets have been renamed from <code>c</code> and <code>e</code> to <code>cost</code> and <code>eff</code>. This is to avoid any conflict with the <code>c()</code> function.</li>
<li>Changed the axes labels in the cost-effectiveness planes from “differential” to “incremental”. (688d98b)</li>
</ul>
</section>
<section id="new-features" class="level2">
<h2 class="anchored" data-anchor-id="new-features">New features</h2>
<ul>
<li>Can now specify what order the interventions labels are in the legend for ce plane (and contour plots) for base R and ggplot2 i.e.&nbsp;reference first or second with optional <code>ref_first</code> argument (cc38f07)</li>
<li>Can specify currency for axes in <code>ce-plane.plot</code> and <code>ceac.plot</code> <code>ggplot2</code> versions (6808aa6)</li>
<li>Argument added to <code>ceplane.plot</code> of <code>icer_annot</code> to annotate each of the ICER points with the text label of the intervention name. Only for <code>ggplot2</code> at the moment. (a7b4beb)</li>
<li>Added <code>pos</code> argument to <code>contour2()</code> so that its consistent with <code>contour()</code> and <code>ceplane.plot()</code>. (50f8f8b)</li>
<li>Allow passing <code>ref</code> argument by name as well as index in <code>bcea()</code>. (9eab459)</li>
</ul>
<p>If there’s anything else you’d like to change, fiddle with, just shout! :wink:</p>
<!--
This files first derives the relative path to the folder under which the page to share on selected social media is stored. 
Then it creates a series of sharing buttons --- currently implemented:
- Twitter
- Email
- LinkedIn
- Whatsapp
Others are fairly easy to create --- only need the fa icon of the relevant media + the combination of text that would be required
to automatically share in on that platform
-->
<br>
<center>
<a href="https://twitter.com/intent/tweet?url=https://gianluca.statistica.it/blog/2022-08-25-new-bcea&amp;text=new%20BCEA"><i class="fa-brands fa-twitter fa-lg" title="Share on Twitter" style="color:#383838" aria-label="twitter"></i></a> &nbsp; <a href="mailto:?subject=new%20BCEA&amp;body=https://gianluca.statistica.it/blog/2022-08-25-new-bcea"><i class="fa-solid fa-envelope fa-lg" title="Share by email" style="color:#383838" aria-label="envelope"></i></a> &nbsp; <a href="https://www.linkedin.com/shareArticle?url=https://gianluca.statistica.it/blog/2022-08-25-new-bcea&amp;title=new%20BCEA"><i class="fa-brands fa-linkedin fa-lg" title="Share on LinkedIn" style="color:#383838" aria-label="linkedin"></i></a> &nbsp; <a href="https://web.whatsapp.com/send?text=new%20BCEAhttps://gianluca.statistica.it/blog/2022-08-25-new-bcea"><i class="fa-brands fa-whatsapp fa-lg" title="Share on Whatsapp" style="color:#383838" aria-label="whatsapp"></i></a> &nbsp; <a href="https://reddit.com/submit?url=https://gianluca.statistica.it/blog/2022-08-25-new-bcea&amp;title=new%20BCEA"><i class="fa-brands fa-reddit fa-lg" title="Share on Reddit" style="color:#383838" aria-label="reddit"></i></a>
</center>


</section>

 ]]></description>
  <category>Bayesian statistics</category>
  <category>Health economics</category>
  <category>R</category>
  <category>Software</category>
  <guid>https://gianluca.statistica.it/blog/2022-08-25-new-bcea/</guid>
  <pubDate>Wed, 24 Aug 2022 23:00:00 GMT</pubDate>
</item>
<item>
  <title>Summer school in Lausanne</title>
  <dc:creator>Gianluca Baio</dc:creator>
  <link>https://gianluca.statistica.it/blog/2022-04-05-summer-school-in-lausanne/</link>
  <description><![CDATA[ 
<!-- This creates a site-wide situation -- if privacy is set on a page it persists across the website -->
<div id="ucl-consent-ui"></div>
<script>
window.uclConsentSettings = {
  persistConsent: true,    // keeps consent in localStorage
  autoHideBanner: true     // hide banner after consent
};
</script>

<!-- This blocks the cookies and complies with regulation -->
<script src="../../js/ucl-consent.blocker.min.js?v=1758018871"></script>
<script src="../../js/ucl-consent.ui-full.min.js?v=1758019745"></script>




<script src="../../js/ucl-consent.blocker.min.js"></script>
<script src="../../js/ucl-consent.ui-full.min.js"></script>




<p>I think it’s now official: after a couple of years in which Covid has ruined everything, we’re now returning with our <a href="../../teaching/summer-school">summer school on Bayesian methods in health economics</a>!</p>
<p>Of course, so many bad things have happened that this can hardly count as a major problem, but I have <em>really</em> missed the good fun we’ve always had in the week-long course, in Florence. And I have actually been very, very happy to get lots of emails from people inquirying about the next one — so much so that a substantial number of registrants for the 2020 edition (which inevitably got cancelled) decided to keep their registration active ready for as soon as the new one could go ahead!</p>
<p>And of course, Covid is far from finished — but after mulling this over, we thought the times are ripe for us to have another go. In fact, I had a big push into this when I was contacted by <a href="https://www.unisante.ch/fr/formation-recherche/annuaire-chercheurs/chercheur/marti-joachim">Joachim Marti</a>, who after spending some time at Imperial is now at Unisante, in Switwerland, with a view at doing something like our Florence summer school, but in Lausanne. And so we’ll do! In fact, the new edition is planned for 20-24 June 2022 (registration is open <a href="https://conference.unil.ch/summer-schools/">here</a>). In some ways, it’ll be a test-run — the programme is pretty much identical to what we were doing in Florence, but the last two years have taught us so much in terms of using technology and so I may be experimenting with a couple of innovations (but I’ll keep some mistery here…). Also, we have a slightly changed team of instructors, at least for this year.</p>
<p>There’s a limited number of places available — and the nicest thing is that the whole registration process is in the hands of our Swiss friends :wink: so, on the one hand it will be super smooth, but on the other hand, if you’re interested you should move quickly, before we run out of places!</p>
<p>Also: on the plus side, I just discovered that in addition to its nice lakeside location, Lausanne has also hosted one edition of the <a href="https://en.wikipedia.org/wiki/Eurovision_Song_Contest_1989">Eurovision song contest</a>…</p>
<!--
This files first derives the relative path to the folder under which the page to share on selected social media is stored. 
Then it creates a series of sharing buttons --- currently implemented:
- Twitter
- Email
- LinkedIn
- Whatsapp
Others are fairly easy to create --- only need the fa icon of the relevant media + the combination of text that would be required
to automatically share in on that platform
-->
<br>
<center>
<a href="https://twitter.com/intent/tweet?url=https://gianluca.statistica.it/blog/2022-04-05-summer-school-in-lausanne&amp;text=Summer%20school%20in%20Lausanne"><i class="fa-brands fa-twitter fa-lg" title="Share on Twitter" style="color:#383838" aria-label="twitter"></i></a> &nbsp; <a href="mailto:?subject=Summer%20school%20in%20Lausanne&amp;body=https://gianluca.statistica.it/blog/2022-04-05-summer-school-in-lausanne"><i class="fa-solid fa-envelope fa-lg" title="Share by email" style="color:#383838" aria-label="envelope"></i></a> &nbsp; <a href="https://www.linkedin.com/shareArticle?url=https://gianluca.statistica.it/blog/2022-04-05-summer-school-in-lausanne&amp;title=Summer%20school%20in%20Lausanne"><i class="fa-brands fa-linkedin fa-lg" title="Share on LinkedIn" style="color:#383838" aria-label="linkedin"></i></a> &nbsp; <a href="https://web.whatsapp.com/send?text=Summer%20school%20in%20Lausannehttps://gianluca.statistica.it/blog/2022-04-05-summer-school-in-lausanne"><i class="fa-brands fa-whatsapp fa-lg" title="Share on Whatsapp" style="color:#383838" aria-label="whatsapp"></i></a> &nbsp; <a href="https://reddit.com/submit?url=https://gianluca.statistica.it/blog/2022-04-05-summer-school-in-lausanne&amp;title=Summer%20school%20in%20Lausanne"><i class="fa-brands fa-reddit fa-lg" title="Share on Reddit" style="color:#383838" aria-label="reddit"></i></a>
</center>



 ]]></description>
  <category>Bayesian statistics</category>
  <category>Health economics</category>
  <guid>https://gianluca.statistica.it/blog/2022-04-05-summer-school-in-lausanne/</guid>
  <pubDate>Mon, 04 Apr 2022 23:00:00 GMT</pubDate>
</item>
<item>
  <title>survHE light</title>
  <link>https://gianluca.statistica.it/blog/2022-01-18-survhe-light/</link>
  <description><![CDATA[ 
<!-- This creates a site-wide situation -- if privacy is set on a page it persists across the website -->
<div id="ucl-consent-ui"></div>
<script>
window.uclConsentSettings = {
  persistConsent: true,    // keeps consent in localStorage
  autoHideBanner: true     // hide banner after consent
};
</script>

<!-- This blocks the cookies and complies with regulation -->
<script src="../../js/ucl-consent.blocker.min.js?v=1758018871"></script>
<script src="../../js/ucl-consent.ui-full.min.js?v=1758019745"></script>




<script src="../../js/ucl-consent.blocker.min.js"></script>
<script src="../../js/ucl-consent.ui-full.min.js"></script>




<div class="callout callout-style-default callout-important callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Important
</div>
</div>
<div class="callout-body-container callout-body">
<p>The instructions for installations described below are now (as of April 2023) superseded — see <a href="../../software/survhe/index.html">here</a>!</p>
</div>
</div>
<p>I’ve made a major refactoring of (the development version of) <a href="https://github.com/giabaio/survHE/tree/devel"><code>survHE</code></a>. I guess one of the main issues with the package (both from the point of view of the user and the maintainer) was that <code>survHE</code> <em>is</em> a big package and installation is a very lengthy process. And this is no surprise: the trade-off here is between the massive savings in computational time that are obtained by pre-compiling the Bayesian models available (through <a href="https://mc-stan.org/users/interfaces/rstan"><code>rstan</code></a>) and the time it takes to get everything installed on your machine…</p>
<p>And, from the developer’s point of view, often submission to CRAN has been a pain, because some of the files that get installed are very large and, again because of the nature of the package, there’s quite an intricate structure of “dependencies”, which makes the package very heavy.</p>
<p>What I’ve now done is, to put it pompously, in the spirit of some kind of <code>survHE</code>-verse, in the sense that I’ve split up the package in three parts (well, in fact three packages, really). The first one (which I’m still calling <a href="https://github.com/giabaio/survHE/tree/devel"><code>survHE</code></a>) does contain all the back-bone and prepares for the full functionalities (ie running the built-in survival models under both a frequentist approach, using <a href="https://cran.r-project.org/web/packages/flexsurv/flexsurv.pdf"><code>flexsurv</code></a> and a Bayesian approach, either using <a href="https://www.r-inla.org/"><code>INLA</code></a> or <code>rstan</code>). But, crucially, the new <code>survHE</code> isn’t enough to open up all these facilities — it only implements the simpler frequentist models and so dispenses with lots of the complicated and computationally-intensive, time-consuming bits. So if you install <code>survHE</code> with:</p>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb1-1">remotes<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">install_github</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"giabaio/survHE"</span>, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">ref=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"devel"</span>)</span></code></pre></div></div>
</div>
<ul>
<li>You can only run the models using <code>flexsurv</code>;</li>
<li>All the options for the Bayesian models <em>are</em> coded up…</li>
</ul>
<p><strong>BUT</strong>: you need to install additional “modules” to enable the <code>INLA</code> and <code>rstan</code> facilities of <code>survHE</code>. You do this with:</p>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb2" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb2-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Install the INLA module</span></span>
<span id="cb2-2">remotes<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">install_github</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"giabaio/survHE"</span>, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">ref=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"inla"</span>)</span></code></pre></div></div>
</div>
<p>and / or</p>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb3" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb3-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Install the HMC module</span></span>
<span id="cb3-2">remotes<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">install_github</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"giabaio/survHE"</span>, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">ref=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"hmc"</span>)</span></code></pre></div></div>
</div>
<p>The first of these two packages/steps isn’t too time-consuming and installing <code>survHEinla</code> is fairly quick. The second is the actual bottle-neck and installing <code>survHEhmc</code> is a longer process — because like I said, it does install all the pre-compiled models and the heavy dependencies that come from <code>rstan</code>.</p>
<p>Basically, <code>survHEinla</code> and <code>survHEhmc</code> are <strong>not</strong> really stand-along packages. The user shouldn’t call them individually and, in effect, they don’t have all the actual facilities (eg the functions to plot and produce summaries, as well as the PSA facilities, which are still coded up in the main installation of <code>survHE</code>). On the contrary, they both “depend” on <code>survHE</code>, so that when they are loaded, <code>survHE</code> and all its functions are also automatically loaded.</p>
<p>From the user point of view, not much changes. You can still run a model using <code>fit.models</code> like this:</p>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb4" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb4-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Loads the "basic" survHE</span></span>
<span id="cb4-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(survHE)</span>
<span id="cb4-3"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Loads the example dataset from 'flexsurv'</span></span>
<span id="cb4-4"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">data</span>(bc)</span>
<span id="cb4-5"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Fits a survival model using 'flexsurv' in the background</span></span>
<span id="cb4-6">mle <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">fit.models</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">formula=</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Surv</span>(recyrs,censrec)<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span>group,<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">data=</span>bc,</span>
<span id="cb4-7">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">distr=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"exp"</span>,<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">method=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"mle"</span>)</span></code></pre></div></div>
</div>
<p>To do this, you don’t even need to install the Bayesian modules. But if you have installed either or both of them, you can simply specify the option <code>method='hmc'</code> or <code>method='inla'</code> and, in the background, <code>survHE</code> will check that you have the relevant module installed and load it, if so. As far as the user is concerned the call to fit a Bayesian model is the same as before</p>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb5" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb5-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Loads the "basic" survHE</span></span>
<span id="cb5-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(survHE)</span>
<span id="cb5-3"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Loads the example dataset from 'flexsurv'</span></span>
<span id="cb5-4"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">data</span>(bc)</span>
<span id="cb5-5"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Fits a survival model using 'flexsurv' in the background</span></span>
<span id="cb5-6">inla <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">fit.models</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">formula=</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Surv</span>(recyrs,censrec)<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span>group,<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">data=</span>bc,</span>
<span id="cb5-7">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">distr=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"exp"</span>,<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">method=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"inla"</span>)</span></code></pre></div></div>
</div>
<p>or</p>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb6" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb6-1">hmc <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">fit.models</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">formula=</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Surv</span>(recyrs,censrec)<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span>group,<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">data=</span>bc,</span>
<span id="cb6-2">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">distr=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"exp"</span>,<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">method=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"hmc"</span>)</span></code></pre></div></div>
</div>
<p>If you request a Bayesian model but have only installed <code>survHE</code> (and none of the Bayesian modules) the above calls with <code>method</code> set to either <code>inla</code> or <code>hmc</code> will return a message to instruct you to install <code>survHEinla</code> and/or <code>survHEhmc</code>, which you do like above, using <code>remotes::install_github</code>.</p>
<p>I’ll probably re-package it all and submit the three separate packages to CRAN — although I may leave <code>survHEinla</code> and <code>survHEhmc</code> on the GitHub repo only — this would make the submission process <strong>much</strong> easier, because in the current version, <code>survHE</code> is a very light-weight package. And installing from GitHub is increasingly easy — and very efficient for us to manage/update.</p>
<!--
This files first derives the relative path to the folder under which the page to share on selected social media is stored. 
Then it creates a series of sharing buttons --- currently implemented:
- Twitter
- Email
- LinkedIn
- Whatsapp
Others are fairly easy to create --- only need the fa icon of the relevant media + the combination of text that would be required
to automatically share in on that platform
-->
<br>
<center>
<!-- This uses a trick and an external widget to share on any of the federated servers on Mastodon
   see: https://shkspr.mobi/blog/2022/06/create-a-share-to-mastodon-button-for-wordpress/
-->
<a href="https://toot.kytta.dev/?text=survHE%20light%20https://gianluca.statistica.it/blog/2022-01-18-survhe-light" target="_blank" onclick="window.open(this.href,'targetWindow','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=400px,height=600px'); return false;"><i class="fa-brands fa-mastodon fa-lg" title="Share on Mastodon" style="color:#383838" aria-label="mastodon"></i></a> &nbsp; <a href="https://twitter.com/intent/tweet?url=https://gianluca.statistica.it/blog/2022-01-18-survhe-light/&amp;text=survHE%20light" target="_blank"><i class="fa-brands fa-twitter fa-lg" title="Share on Twitter" style="color:#383838" aria-label="twitter"></i></a> &nbsp; <a href="mailto:?subject=survHE%20light&amp;body=https://gianluca.statistica.it/blog/2022-01-18-survhe-light" target="_blank"><i class="fa-solid fa-envelope fa-lg" title="Share by email" style="color:#383838" aria-label="envelope"></i></a> &nbsp; <a href="https://www.linkedin.com/shareArticle?url=https://gianluca.statistica.it/blog/2022-01-18-survhe-light/&amp;title=survHE%20light" target="_blank"><i class="fa-brands fa-linkedin fa-lg" title="Share on LinkedIn" style="color:#383838" aria-label="linkedin"></i></a> &nbsp; <a href="https://web.whatsapp.com/send?text=survHE%20lighthttps://gianluca.statistica.it/blog/2022-01-18-survhe-light/" target="_blank"><i class="fa-brands fa-whatsapp fa-lg" title="Share on Whatsapp" style="color:#383838" aria-label="whatsapp"></i></a> &nbsp; <a href="https://reddit.com/submit?url=https://gianluca.statistica.it/blog/2022-01-18-survhe-light/&amp;title=survHE%20light" target="_blank"><i class="fa-brands fa-reddit fa-lg" title="Share on Reddit" style="color:#383838" aria-label="reddit"></i></a>
</center>



 ]]></description>
  <category>Bayesian statistics</category>
  <category>Health economics</category>
  <guid>https://gianluca.statistica.it/blog/2022-01-18-survhe-light/</guid>
  <pubDate>Tue, 18 Jan 2022 00:00:00 GMT</pubDate>
</item>
<item>
  <title>Armitage lecture</title>
  <link>https://gianluca.statistica.it/blog/2021-11-12-armitage-lecture/</link>
  <description><![CDATA[ 
<!-- This creates a site-wide situation -- if privacy is set on a page it persists across the website -->
<div id="ucl-consent-ui"></div>
<script>
window.uclConsentSettings = {
  persistConsent: true,    // keeps consent in localStorage
  autoHideBanner: true     // hide banner after consent
};
</script>

<!-- This blocks the cookies and complies with regulation -->
<script src="../../js/ucl-consent.blocker.min.js?v=1758018871"></script>
<script src="../../js/ucl-consent.ui-full.min.js?v=1758019745"></script>




<script src="../../js/ucl-consent.blocker.min.js"></script>
<script src="../../js/ucl-consent.ui-full.min.js"></script>




<p>This week has been a fantastic one. I went to Cambridge to give the <a href="https://www.mrc-bsu.cam.ac.uk/news-and-events/armitage-lectureships-and-workshops/18th-armitage-lecture-and-workshop/">18th Armitage Lecture</a>; I have to say, when I was invited back in the summer, my first reaction was of course that I was very, very pleased and honoured. Looking at the list of previous Lecturers was pretty daunting, though — which in a way only increased the honour, while also increasing slightly the pressure… :wink:</p>
<p>The theme was around “Decision-based inference” so I thought I’d speak about my work on economic evaluation and, specifically, <a href="../../project/survival/">survival modelling</a> and then the <a href="../../project/voi/">value of information</a>. I had a relatively clear idea of what I wanted to say, but of course, for an occasion such as this, you need to up your game to the top level and so it really took me a couple of months to prepare my presentation. Especially, because I lost an awful lot of time to get the narrative (and the gifs…) right. And also I spent quite a big chunk of that time figuring out the intro — in the event, I hear that people have enjoyed my excursus into the <a href="../../slides/armitage/lecture/#2">many Italian successes over 2021</a> and <a href="../../slides/armitage/lecture/#9">fears for regression to the mean in 2022</a>. I hear that a recording will be made available soon — and I’ll post the link as soon as I get it. In the meantime, the slides of my lecture are <a href="../../slides/armitage/lecture">here</a>.</p>
<p>Speaking of, the organisation at the <a href="https://www.mrc-bsu.cam.ac.uk">MRC BSU</a> has been <em>amazing</em>. All worked like a Swiss watch, but of course, that was even more impressive in the face of constant threats for the need to completely change the schedule, fears of having to go fully remote etc. The team have been fantastic, especially because while the main event is on one day, the actual visit consists of three (intense, but frankly exhilarating) days.</p>
<p>Day 1 (Tuesday), I attended two PhD seminars (which, <em>ça va sans dire</em>, were very nice) and then gave a talk for the BSU. I toyed with the idea of doing someting about our work on <a href="../../project/missing">missing data</a> but I decided to do something different and spoke about our work on <a href="https://www.medrxiv.org/content/10.1101/2021.10.18.21264686v1">Covid excess mortality</a> — slides <a href="../../slides/armitage/seminar/">here</a>. Once again, even for an annoying nerd like I pride myself of being in terms of how I like my slides, I did spend quite a bit of time to prepare the presentation (including changing template to have a different one than the main event). But the talk seem to have gone well, so I’m pleased.</p>
<p>Day 2 (Wednesday) was the main event. And although I was supposed to be some kind of big shot there, I think that the quality of the talks has been outstanding. There were four talks by various researchers within the BSU, to represent the different research themes — and I have to say I have enjoyed very much all four! <a href="https://www.mrc-bsu.cam.ac.uk/people/in-alphabetical-order/h-to-m/christopher-jackson/">Chris’</a> was naturally closer to my own work, so it was easier to get interested in the talk. The other talks by <a href="https://www.mrc-bsu.cam.ac.uk/people/in-alphabetical-order/a-to-g/nina-deliu/">Nina Deliu</a>, <a href="https://www.mrc-bsu.cam.ac.uk/people/in-alphabetical-order/n-to-s/oscar-rueda/">Oscar Rueda</a> and <a href="https://research.vumc.nl/en/persons/mark-van-de-wiel">Mark van de Wiel</a> were all a bit further away from my “normal” modelling/areas of direct interest, but all very good and engaging. And, in addition, although the live audience was limited to about 30 people and wearing masks for basically the whole time was a bit heavy, it felt <em>really</em> nice to experience the “conference vibe”. And it was a fantastic chance to catch up with colleagues with whom I haven’t talked (at least not in person) for a while — as well as to meet new very interesting people. And because I was the guest of honour, basically everybody was <strong>so</strong> nice to me that it was almost unreal…</p>
<p>Day 3 (Thursday) was for some more meetings with people, to discuss their research or simply catch up, which, once again, was really nice. Day 4 (today) wasn’t really part of the Armitage Workshop, but it was still marked by an Armitage-related event — in that Professor Peter Armitage himself (!) has written an email to say he’s enjoyed the event and my talk, which in itself would have been worth the whole thing!</p>
<p><img src="https://gianluca.statistica.it/blog/2021-11-12-armitage-lecture/images/speakers.jpeg" class="img-fluid"></p>
<!--
This files first derives the relative path to the folder under which the page to share on selected social media is stored. 
Then it creates a series of sharing buttons --- currently implemented:
- Twitter
- Email
- LinkedIn
- Whatsapp
Others are fairly easy to create --- only need the fa icon of the relevant media + the combination of text that would be required
to automatically share in on that platform
-->
<br>
<center>
<a href="https://twitter.com/intent/tweet?url=https://gianluca.statistica.it/blog/2021-11-12-armitage-lecture&amp;text=Armitage%20lecture"><i class="fa-brands fa-twitter fa-lg" title="Share on Twitter" style="color:#383838" aria-label="twitter"></i></a> &nbsp; <a href="mailto:?subject=Armitage%20lecture&amp;body=https://gianluca.statistica.it/blog/2021-11-12-armitage-lecture"><i class="fa-solid fa-envelope fa-lg" title="Share by email" style="color:#383838" aria-label="envelope"></i></a> &nbsp; <a href="https://www.linkedin.com/shareArticle?url=https://gianluca.statistica.it/blog/2021-11-12-armitage-lecture&amp;title=Armitage%20lecture"><i class="fa-brands fa-linkedin fa-lg" title="Share on LinkedIn" style="color:#383838" aria-label="linkedin"></i></a> &nbsp; <a href="https://web.whatsapp.com/send?text=Armitage%20lecturehttps://gianluca.statistica.it/blog/2021-11-12-armitage-lecture"><i class="fa-brands fa-whatsapp fa-lg" title="Share on Whatsapp" style="color:#383838" aria-label="whatsapp"></i></a> &nbsp; <a href="https://reddit.com/submit?url=https://gianluca.statistica.it/blog/2021-11-12-armitage-lecture&amp;title=Armitage%20lecture"><i class="fa-brands fa-reddit fa-lg" title="Share on Reddit" style="color:#383838" aria-label="reddit"></i></a>
</center>



 ]]></description>
  <category>Bayesian statistics</category>
  <category>Health economics</category>
  <category>Perso</category>
  <guid>https://gianluca.statistica.it/blog/2021-11-12-armitage-lecture/</guid>
  <pubDate>Fri, 12 Nov 2021 00:00:00 GMT</pubDate>
</item>
<item>
  <title>New version</title>
  <link>https://gianluca.statistica.it/blog/2021-10-02-new-version/</link>
  <description><![CDATA[ 
<!-- This creates a site-wide situation -- if privacy is set on a page it persists across the website -->
<div id="ucl-consent-ui"></div>
<script>
window.uclConsentSettings = {
  persistConsent: true,    // keeps consent in localStorage
  autoHideBanner: true     // hide banner after consent
};
</script>

<!-- This blocks the cookies and complies with regulation -->
<script src="../../js/ucl-consent.blocker.min.js?v=1758018871"></script>
<script src="../../js/ucl-consent.ui-full.min.js?v=1758019745"></script>




<script src="../../js/ucl-consent.blocker.min.js"></script>
<script src="../../js/ucl-consent.ui-full.min.js"></script>




<p>I’ve managed to update my website to the newest version of <a href="https://wowchemy.com/"><code>wowchemy</code></a> (that’s the engine that, together with <a href="https://github.com/rstudio/blogdown"><code>blogdown</code></a> runs the show, behind the scenes). Most changes are really under the hood and, to be fair, you wouldn’t see a lot of what has changed, by simply browsing. I think both <code>wowchemy</code> and the latest release of <code>blogdown</code>, however, make the work easier — it’s actually quite a steep learning curve to get yourself going. Or at least it was when I first did mine: to be fair, the <code>blogdown</code> crowd have done fantastic <a href="https://www.apreshill.com/blog/2020-12-new-year-new-blogdown/">work</a> to simplify the whole process.</p>
<p>One thing that caught my eye is a little tweak that <a href="https://www.apreshill.com/about/">Alison Hill</a> did with her own <a href="https://gohugo.io/"><code>Hugo</code></a> theme (<a href="https://www.apreshill.com/project/hugo-apero/">Hugo Apéro</a>), to add a little button that, when you click on it, says your name how you like to get it pronounced — I think that’s a very nice touch: sometimes I get people pronouncing my surname in ways that sound a bit weird and I can only imagine how bad it can get for people…</p>
<p>In fact, I thought that, in addition to stealing Alison’s idea, I’d add a litle bit of my own, by including the phonetic transcription (I know: that’s a massive nerdy thing to do — but I like it… :wink:!).</p>
<p>Other than my website, there kind of is a new version of me too — now that I’ve officially taken over as Head of Department. It’s been a month now and so far I still haven’t bankrupted the department or driven away most of my colleagues, which I take as a massive sign of success… It’s at times overwhelming (with several “emergencies”, things you need to react to very quickly), with a couple of issues to resolve very quickly (all positively, for now, thankfully!). But I’m still enjoying it — we’ll see how long this lasts…</p>
<!--
This files first derives the relative path to the folder under which the page to share on selected social media is stored. 
Then it creates a series of sharing buttons --- currently implemented:
- Twitter
- Email
- LinkedIn
- Whatsapp
Others are fairly easy to create --- only need the fa icon of the relevant media + the combination of text that would be required
to automatically share in on that platform
-->
<br>
<center>
<a href="https://twitter.com/intent/tweet?url=https://gianluca.statistica.it/blog/2021-10-02-new-version&amp;text=New%20version"><i class="fa-brands fa-twitter fa-lg" title="Share on Twitter" style="color:#383838" aria-label="twitter"></i></a> &nbsp; <a href="mailto:?subject=New%20version&amp;body=https://gianluca.statistica.it/blog/2021-10-02-new-version"><i class="fa-solid fa-envelope fa-lg" title="Share by email" style="color:#383838" aria-label="envelope"></i></a> &nbsp; <a href="https://www.linkedin.com/shareArticle?url=https://gianluca.statistica.it/blog/2021-10-02-new-version&amp;title=New%20version"><i class="fa-brands fa-linkedin fa-lg" title="Share on LinkedIn" style="color:#383838" aria-label="linkedin"></i></a> &nbsp; <a href="https://web.whatsapp.com/send?text=New%20versionhttps://gianluca.statistica.it/blog/2021-10-02-new-version"><i class="fa-brands fa-whatsapp fa-lg" title="Share on Whatsapp" style="color:#383838" aria-label="whatsapp"></i></a> &nbsp; <a href="https://reddit.com/submit?url=https://gianluca.statistica.it/blog/2021-10-02-new-version&amp;title=New%20version"><i class="fa-brands fa-reddit fa-lg" title="Share on Reddit" style="color:#383838" aria-label="reddit"></i></a>
</center>



 ]]></description>
  <category>Miscellanea</category>
  <guid>https://gianluca.statistica.it/blog/2021-10-02-new-version/</guid>
  <pubDate>Fri, 01 Oct 2021 23:00:00 GMT</pubDate>
</item>
<item>
  <title>Euros prediction (5)</title>
  <link>https://gianluca.statistica.it/blog/2021-07-10-euros-prediction-(5)/</link>
  <description><![CDATA[ 
<!-- This creates a site-wide situation -- if privacy is set on a page it persists across the website -->
<div id="ucl-consent-ui"></div>
<script>
window.uclConsentSettings = {
  persistConsent: true,    // keeps consent in localStorage
  autoHideBanner: true     // hide banner after consent
};
</script>

<!-- This blocks the cookies and complies with regulation -->
<script src="../../js/ucl-consent.blocker.min.js?v=1758018871"></script>
<script src="../../js/ucl-consent.ui-full.min.js?v=1758019745"></script>




<script src="../../js/ucl-consent.blocker.min.js"></script>
<script src="../../js/ucl-consent.ui-full.min.js"></script>




<p>Final time — the <a href="../../blog/2021-07-06-euros-prediction-4/">model</a> (and bookies) predictions have indeed materialised and Italy face England in the final. I’ve done the final update after the semi-finals and here’s the model prediction.</p>
<p><img src="https://gianluca.statistica.it/blog/2021-07-10-euros-prediction-(5)/images/final.png" class="img-fluid"></p>
<p>Italy are favourite — I think this is probably right, though I also believe it’ll probably be a slightly closer game. The <a href="https://www.oddschecker.com/football/euro-2020">bookies</a> go the other way and, I think a bit overly-enthusiastically, tip England to be just above Italy (the odds map to probabilities of about 31% for Italy to win, 37% for England to win and 32% for a draw). Even considering the home advantage, I don’t think England are on top <strong>by that margin</strong> — it’s not impossible they win (and the model predictions reflect this, to be fair), but…</p>
<p><em>Personally</em>, I think that England will try and start strong (as they’ve basically done in all the tournament games). When they don’t score immediately, in particular, they then tend to slow down massively and the second part of the half generally see their opponents take over — Denmark took the lead and threatened to score a second and even in their game again Scotland in the group stage, after an intial English burst, the Scots sort of took over the proceedings, though they were never <em>too</em> dangerous… Italy, on the other hand, typically also tend to take control and starts churning their opponents, even when they fail to break them (like against Turkey or Austria, in the first half of these games). Of course, Spain have done this much better than us in the semi-final, but then we showed we can still adapt and defend, if necessary. That’s why I can see this as a close game — but I hope we win it (and that the model is right!) <i class="fa-solid fa-face-smile-wink" aria-label="face-smile-wink"></i></p>
<!--
This files first derives the relative path to the folder under which the page to share on selected social media is stored. 
Then it creates a series of sharing buttons --- currently implemented:
- Twitter
- Email
- LinkedIn
- Whatsapp
Others are fairly easy to create --- only need the fa icon of the relevant media + the combination of text that would be required
to automatically share in on that platform
-->
<br>
<center>
<a href="https://twitter.com/intent/tweet?url=https://gianluca.statistica.it/blog/2021-07-10-euros-prediction-(5)&amp;text=Euros%20prediction%20(5)"><i class="fa-brands fa-twitter fa-lg" title="Share on Twitter" style="color:#383838" aria-label="twitter"></i></a> &nbsp; <a href="mailto:?subject=Euros%20prediction%20(5)&amp;body=https://gianluca.statistica.it/blog/2021-07-10-euros-prediction-(5)"><i class="fa-solid fa-envelope fa-lg" title="Share by email" style="color:#383838" aria-label="envelope"></i></a> &nbsp; <a href="https://www.linkedin.com/shareArticle?url=https://gianluca.statistica.it/blog/2021-07-10-euros-prediction-(5)&amp;title=Euros%20prediction%20(5)"><i class="fa-brands fa-linkedin fa-lg" title="Share on LinkedIn" style="color:#383838" aria-label="linkedin"></i></a> &nbsp; <a href="https://web.whatsapp.com/send?text=Euros%20prediction%20(5)https://gianluca.statistica.it/blog/2021-07-10-euros-prediction-(5)"><i class="fa-brands fa-whatsapp fa-lg" title="Share on Whatsapp" style="color:#383838" aria-label="whatsapp"></i></a> &nbsp; <a href="https://reddit.com/submit?url=https://gianluca.statistica.it/blog/2021-07-10-euros-prediction-(5)&amp;title=Euros%20prediction%20(5)"><i class="fa-brands fa-reddit fa-lg" title="Share on Reddit" style="color:#383838" aria-label="reddit"></i></a>
</center>



 ]]></description>
  <category>Bayesian statistics</category>
  <category>Miscellanea</category>
  <guid>https://gianluca.statistica.it/blog/2021-07-10-euros-prediction-(5)/</guid>
  <pubDate>Fri, 09 Jul 2021 23:00:00 GMT</pubDate>
</item>
<item>
  <title>Euros prediction (4)</title>
  <link>https://gianluca.statistica.it/blog/2021-07-06-euros-prediction-(4)/</link>
  <description><![CDATA[ 
<!-- This creates a site-wide situation -- if privacy is set on a page it persists across the website -->
<div id="ucl-consent-ui"></div>
<script>
window.uclConsentSettings = {
  persistConsent: true,    // keeps consent in localStorage
  autoHideBanner: true     // hide banner after consent
};
</script>

<!-- This blocks the cookies and complies with regulation -->
<script src="../../js/ucl-consent.blocker.min.js?v=1758018871"></script>
<script src="../../js/ucl-consent.ui-full.min.js?v=1758019745"></script>




<script src="../../js/ucl-consent.blocker.min.js"></script>
<script src="../../js/ucl-consent.ui-full.min.js"></script>




<p>I haven’t posted the results for the quarter-finals ahead of the games, but I did run the model and here were the predictions.</p>
<p><img src="https://gianluca.statistica.it/blog/2021-07-06-euros-prediction-(4)/images/quarter-finals.png" class="img-fluid"></p>
<p>Not too bad, in the end: the model did get that Spain-Switzerland would be a tough one and the resulting 1-1 was one of the most likely outcomes. Similarly, while giving Belgium a bit of an edge, the model had predicted that their clash with Italy would be very close and the eventual 2-1 win for the Azzurri (yay!) was a rather likely outcome. Denmark were massively favourite to win (with over 60% chance over the simulations from the joint predictive distribution of goals scored), which was confirmed by the actual result, though the Czech Republic gave them a game, especially in the second half. The eventual 2-1 score was actually the second most likely, according to the model. Finally, while England were also tipped to win easily against Ukrain (50% chance of an England win according to the model), the actual outcome (4-0) was rather unlikely under the model — which I stand by: before the last game, England had only scored 4 goals in 4 games.</p>
<p>On to the semi-finals, I’ve updated the dataset with the results of the later games and re-run the model to predict the next two; the results are in the picture below.</p>
<p><img src="https://gianluca.statistica.it/blog/2021-07-06-euros-prediction-(4)/images/semi-finals.png" class="img-fluid"></p>
<p>Basically, Italy are slight favourite against Spain (though I think perhaps the match will be a bit tighter than that); this is, once again, very much in line with the <a href="https://www.oddschecker.com/football/euro-2020">bookies odds</a> (who give Italy 20:13 — equivalent to a probability of winning of 40% — and Spain 11:5, or a probability of 31%). I’m kinda touching anything woody (I think Spain are not 2010 Spain, but they’re not 2021 Republic of Crappy Football either, so I sort of agree with the model, giving us a slight edge, but I know it’ll be a tough one!).</p>
<p>As for England-Denmark, my model slightly deviates from the bookies (who give England as clear favourites with odds against of 3:4, implying a probability of winning estimated at over 57%, to the 49:10 odds against Denmark, equalling a probability of only 17%). <a href="https://b14b01ba-1c54-4641-8615-1277063874c6.filesusr.com/ugd/05c43e_1d29601f9fe54a71b6e2a60a78a3bbf6.pdf">Leonardo’s model</a> is closer to this prediction, while mine calls the game as <strong>very</strong> tight; England are <em>slight</em> favourite (41% change of winning) but Denmark are not far (39.5%) — this time I’ve used 50,000 simulations from the joint predictive distributions because I wanted to fully characterise uncertainty in the distributions and reduce Monte Carlo error.</p>
<p>I think England are probably favourite to win this game — but I all things considered, I don’t think the model is preposterous in giving the Danes a fair shout. Among the things that the model <em>knows</em>:</p>
<ul>
<li>England will have the home advantage;<br>
</li>
<li>England are ranked higher in the FIFA league tables;<br>
</li>
<li>England have not conceded in the last few games;<br>
</li>
<li>Denmark are also ranked rather high in the FIFA tables and have done well in the past few games (apart from defeat against Finland).</li>
</ul>
<p>The last point in particular, I think, is what has driven the consistent favourable predictions for the Danes that the model has spat out especially for the knockout stage (when they were hot favourites to beat both Wales and the Czechs).</p>
<p>Among the things that the model does <strong>not</strong> know:</p>
<ul>
<li>England will have the home <em>pressure</em> — obviously the fans are over excited and this can be a double-edged sword (a bit like for Belgium against Italy in the quarter-finals… Some considered that game the “last chance for the Golden Generation” and I think some elements of “now or never” are already playing up for the English… This may or may not affect their performance, but then again, it may…);<br>
</li>
<li>Denmark have an extra bonding and togetherness coming from the horrible <a href="https://www.theguardian.com/football/blog/2021/jun/20/the-day-denmark-stood-still-christian-eriksens-collapse-and-the-heroes-who-saved-him">Eriksen incident</a>. Obviously, they basically didn’t show up in the game that was played only an hour after that and Finland beat them, surprisingly. <strong>BUT</strong>: they then gave Belgium a massive run for their money (in the first half, Denmark kind of destroyed them — and the model prediction wasn’t suggesting a Belgian trashing of the Danes…). And they’ve gone from strength to strength since.</li>
</ul>
<p>Given all this, while I still think England will probably be in the final, I think that the bookies are a bit overly-enthusiastic about it and, until tomorrow, I’ll stick with my model…</p>
<!--
This files first derives the relative path to the folder under which the page to share on selected social media is stored. 
Then it creates a series of sharing buttons --- currently implemented:
- Twitter
- Email
- LinkedIn
- Whatsapp
Others are fairly easy to create --- only need the fa icon of the relevant media + the combination of text that would be required
to automatically share in on that platform
-->
<br>
<center>
<a href="https://twitter.com/intent/tweet?url=https://gianluca.statistica.it/blog/2021-07-06-euros-prediction-(4)&amp;text=Euros%20prediction%20(4)"><i class="fa-brands fa-twitter fa-lg" title="Share on Twitter" style="color:#383838" aria-label="twitter"></i></a> &nbsp; <a href="mailto:?subject=Euros%20prediction%20(4)&amp;body=https://gianluca.statistica.it/blog/2021-07-06-euros-prediction-(4)"><i class="fa-solid fa-envelope fa-lg" title="Share by email" style="color:#383838" aria-label="envelope"></i></a> &nbsp; <a href="https://www.linkedin.com/shareArticle?url=https://gianluca.statistica.it/blog/2021-07-06-euros-prediction-(4)&amp;title=Euros%20prediction%20(4)"><i class="fa-brands fa-linkedin fa-lg" title="Share on LinkedIn" style="color:#383838" aria-label="linkedin"></i></a> &nbsp; <a href="https://web.whatsapp.com/send?text=Euros%20prediction%20(4)https://gianluca.statistica.it/blog/2021-07-06-euros-prediction-(4)"><i class="fa-brands fa-whatsapp fa-lg" title="Share on Whatsapp" style="color:#383838" aria-label="whatsapp"></i></a> &nbsp; <a href="https://reddit.com/submit?url=https://gianluca.statistica.it/blog/2021-07-06-euros-prediction-(4)&amp;title=Euros%20prediction%20(4)"><i class="fa-brands fa-reddit fa-lg" title="Share on Reddit" style="color:#383838" aria-label="reddit"></i></a>
</center>



 ]]></description>
  <category>Bayesian statistics</category>
  <category>Miscellanea</category>
  <guid>https://gianluca.statistica.it/blog/2021-07-06-euros-prediction-(4)/</guid>
  <pubDate>Mon, 05 Jul 2021 23:00:00 GMT</pubDate>
</item>
<item>
  <title>Don’t just take my word for it</title>
  <link>https://gianluca.statistica.it/blog/2021-07-05-dont-just-take-my-word-for-it/</link>
  <description><![CDATA[ 
<!-- This creates a site-wide situation -- if privacy is set on a page it persists across the website -->
<div id="ucl-consent-ui"></div>
<script>
window.uclConsentSettings = {
  persistConsent: true,    // keeps consent in localStorage
  autoHideBanner: true     // hide banner after consent
};
</script>

<!-- This blocks the cookies and complies with regulation -->
<script src="../../js/ucl-consent.blocker.min.js?v=1758018871"></script>
<script src="../../js/ucl-consent.ui-full.min.js?v=1758019745"></script>




<script src="../../js/ucl-consent.blocker.min.js"></script>
<script src="../../js/ucl-consent.ui-full.min.js"></script>




<p><a href="https://twitter.com/RobCalver5">Rob</a> (who, together with his team, has been brilliant in the process of publishing and managing <a href="../../books/bmhe/">BMHE</a> <em>and</em> <a href="../../books/bmpr/">BMPR</a>) has alerted me to the fact thatour edited book “Bayesian Methods in Pharmaceutical Research (Chapman &amp; Hall/CRC Biostatistics Series)” (said “BMPR”), made it to <a href="https://bookauthority.org/books/new-bayesian-statistics-books?t=babya0&amp;s=award&amp;book=113874848X">BookAuthority’s Best New Bayesian Statistics Books</a>.</p>
<p>The official blurb says that</p>
<blockquote class="blockquote">
<p>BookAuthority collects and ranks the best books in the world, and it is a great honor to get this kind of recognition. Thank you for all your support!</p>
</blockquote>
<p>That’s very nice and I’m very pleased about the product. It was a pleasure to work with so many fantastic authors — and the editors team (with <a href="https://www.kuleuven.be/wieiswie/en/person/00004228">Emmanuel</a> and <a href="https://www.linkedin.com/in/bruno-boulanger-5430403/?originalSubdomain=be">Bruno</a>) of course!</p>
<p>I’ll stick the badge here, just because… <i class="fa-solid fa-face-smile-wink" aria-label="face-smile-wink"></i></p>
<p><a class="ba-award" href="https://bookauthority.org/books/new-bayesian-statistics-books?t=babya0&amp;s=award&amp;book=113874848X" target="_blank" style="margin:20px; outline:0"><img src="https://award.bookauthority.org/new-bayesian-statistics-books.png?b=113874848X&amp;c=1&amp;v=6&amp;w=200" style="width:200px; height:183px; border:0" alt="The best new Bayesian Statistics books"></a></p>
<!--
This files first derives the relative path to the folder under which the page to share on selected social media is stored. 
Then it creates a series of sharing buttons --- currently implemented:
- Twitter
- Email
- LinkedIn
- Whatsapp
Others are fairly easy to create --- only need the fa icon of the relevant media + the combination of text that would be required
to automatically share in on that platform
-->
<br>
<center>
<a href="https://twitter.com/intent/tweet?url=https://gianluca.statistica.it/blog/2021-07-05-dont-just-take-my-word-for-it&amp;text=Don't%20just%20take%20my%20word%20for%20it"><i class="fa-brands fa-twitter fa-lg" title="Share on Twitter" style="color:#383838" aria-label="twitter"></i></a> &nbsp; <a href="mailto:?subject=Don't%20just%20take%20my%20word%20for%20it&amp;body=https://gianluca.statistica.it/blog/2021-07-05-dont-just-take-my-word-for-it"><i class="fa-solid fa-envelope fa-lg" title="Share by email" style="color:#383838" aria-label="envelope"></i></a> &nbsp; <a href="https://www.linkedin.com/shareArticle?url=https://gianluca.statistica.it/blog/2021-07-05-dont-just-take-my-word-for-it&amp;title=Don't%20just%20take%20my%20word%20for%20it"><i class="fa-brands fa-linkedin fa-lg" title="Share on LinkedIn" style="color:#383838" aria-label="linkedin"></i></a> &nbsp; <a href="https://web.whatsapp.com/send?text=Don't%20just%20take%20my%20word%20for%20ithttps://gianluca.statistica.it/blog/2021-07-05-dont-just-take-my-word-for-it"><i class="fa-brands fa-whatsapp fa-lg" title="Share on Whatsapp" style="color:#383838" aria-label="whatsapp"></i></a> &nbsp; <a href="https://reddit.com/submit?url=https://gianluca.statistica.it/blog/2021-07-05-dont-just-take-my-word-for-it&amp;title=Don't%20just%20take%20my%20word%20for%20it"><i class="fa-brands fa-reddit fa-lg" title="Share on Reddit" style="color:#383838" aria-label="reddit"></i></a>
</center>



 ]]></description>
  <category>Bayesian statistics</category>
  <guid>https://gianluca.statistica.it/blog/2021-07-05-dont-just-take-my-word-for-it/</guid>
  <pubDate>Sun, 04 Jul 2021 23:00:00 GMT</pubDate>
</item>
<item>
  <title>Euros prediction (3)</title>
  <link>https://gianluca.statistica.it/blog/2021-06-26-euros-prediction-(3)/</link>
  <description><![CDATA[ 
<!-- This creates a site-wide situation -- if privacy is set on a page it persists across the website -->
<div id="ucl-consent-ui"></div>
<script>
window.uclConsentSettings = {
  persistConsent: true,    // keeps consent in localStorage
  autoHideBanner: true     // hide banner after consent
};
</script>

<!-- This blocks the cookies and complies with regulation -->
<script src="../../js/ucl-consent.blocker.min.js?v=1758018871"></script>
<script src="../../js/ucl-consent.ui-full.min.js?v=1758019745"></script>




<script src="../../js/ucl-consent.blocker.min.js"></script>
<script src="../../js/ucl-consent.ui-full.min.js"></script>




<p>OK: I’ve now re-run the model using the updated data including all the games after the group stage. Firstly, a few comments/caveates:</p>
<ol type="1">
<li><p>I think the model predictions for the round of 16 make kind of sense and I’m reasonably happy with them.</p></li>
<li><p><strong>BUT</strong>: there’s lots that the model doesn’t really know… For example, I’ve made no real adjustment for the fact that this batch of games is at the knockout stage, which means that, probably, we may see fewer goals as some teams may have a different attitude and would rather not lose the game at the 90th minute, in search of penalty glory. As far as the model is concerned, these are just another set of games, which may well end in draws — and more importantly, the model doesn’t really account for tactics (overly-defensive teams etc). It wouldn’t be too hard, I think, to modify the model and, for instance, add a layer of complexity — maybe an interaction between the type of tournament and the stage (group vs knockout).</p></li>
<li><p>Interestingly, most (if not all) of the predictions are pretty much aligned with the latest <a href="https://www.oddschecker.com/football/euro-2020">odds</a> (more on this below).</p></li>
</ol>
<p>So: here’re the prediictions. <img src="https://gianluca.statistica.it/blog/2021-06-26-euros-prediction-(3)/images/round-16.png" alt="" width="1200px"></p>
<p>When I saw that, I thought that perhaps the model was being a bit too generous with Denmark (and, to some extent, I still think it’s very much possible that Wales go through), but then again, this is very aligned with the bookies odds, which give Denmark at <img src="https://latex.codecogs.com/png.latex?%5Cfrac%7B11%7D%7B12%7D"> — that is <img src="https://latex.codecogs.com/png.latex?%5Cfrac%7B%5CPr(%5Csf%7B%5Ctext%7BDenmark%20lose%7D%7D)%7D%7B%5CPr(%5Csf%7B%5Ctext%7BDenmark%20win%7D%7D)%7D%20=%20%5Cfrac%7B11%7D%7B12%7D"> which implies <img src="https://latex.codecogs.com/png.latex?%5CPr(%5Csf%7B%5Ctext%7BDenmark%20win%7D%7D)%5Capprox%200.53."> My model is a bit overly-enthusiastic about the Danes, I think — but also, note that the bookies’ odds do not sum to 1 (in fact, their sum is greater than 1 so that they don’t lose too much money, no matter what…).</p>
<p>If you rescale all the odds to probabilities and then ensure that they sum to 1, you get the following table.</p>
<table class="caption-top table">
<thead>
<tr class="header">
<th>Game</th>
<th>Home</th>
<th>Draw</th>
<th>Away</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Wales - <strong>Denmark</strong></td>
<td>0.1906</td>
<td>0.3050</td>
<td>0.5043</td>
</tr>
<tr class="even">
<td><strong>Italy</strong> - Austria</td>
<td>0.6354</td>
<td>0.2411</td>
<td>0.1235</td>
</tr>
<tr class="odd">
<td><strong>Netherlands</strong> - Czech Republic</td>
<td>0.5764</td>
<td>0.2489</td>
<td>0.1747</td>
</tr>
<tr class="even">
<td><em>Belgium</em> - Portugal</td>
<td>0.3882</td>
<td>0.2939</td>
<td>0.3179</td>
</tr>
<tr class="odd">
<td>Croatia - <strong>Spain</strong></td>
<td>0.1426</td>
<td>0.2560</td>
<td>0.6014</td>
</tr>
<tr class="even">
<td><strong>France</strong> - Switzerland</td>
<td>0.6359</td>
<td>0.2466</td>
<td>0.1176</td>
</tr>
<tr class="odd">
<td><em>England</em> - Germany</td>
<td>0.3762</td>
<td>0.2946</td>
<td>0.3292</td>
</tr>
<tr class="even">
<td><em>Sweden</em> - Ukraine</td>
<td>0.4034</td>
<td>0.3074</td>
<td>0.2892</td>
</tr>
</tbody>
</table>
<p>For all the games, the model seems to suggest the same favourite as the bookies — though I think there could be a couple of upsets (Croatia and Ukraine?).</p>
<p>Anyway — let’s see what happens!</p>
<!--
This files first derives the relative path to the folder under which the page to share on selected social media is stored. 
Then it creates a series of sharing buttons --- currently implemented:
- Twitter
- Email
- LinkedIn
- Whatsapp
Others are fairly easy to create --- only need the fa icon of the relevant media + the combination of text that would be required
to automatically share in on that platform
-->
<br>
<center>
<a href="https://twitter.com/intent/tweet?url=https://gianluca.statistica.it/blog/2021-06-26-euros-prediction-(3)&amp;text=Euros%20prediction%20(3)"><i class="fa-brands fa-twitter fa-lg" title="Share on Twitter" style="color:#383838" aria-label="twitter"></i></a> &nbsp; <a href="mailto:?subject=Euros%20prediction%20(3)&amp;body=https://gianluca.statistica.it/blog/2021-06-26-euros-prediction-(3)"><i class="fa-solid fa-envelope fa-lg" title="Share by email" style="color:#383838" aria-label="envelope"></i></a> &nbsp; <a href="https://www.linkedin.com/shareArticle?url=https://gianluca.statistica.it/blog/2021-06-26-euros-prediction-(3)&amp;title=Euros%20prediction%20(3)"><i class="fa-brands fa-linkedin fa-lg" title="Share on LinkedIn" style="color:#383838" aria-label="linkedin"></i></a> &nbsp; <a href="https://web.whatsapp.com/send?text=Euros%20prediction%20(3)https://gianluca.statistica.it/blog/2021-06-26-euros-prediction-(3)"><i class="fa-brands fa-whatsapp fa-lg" title="Share on Whatsapp" style="color:#383838" aria-label="whatsapp"></i></a> &nbsp; <a href="https://reddit.com/submit?url=https://gianluca.statistica.it/blog/2021-06-26-euros-prediction-(3)&amp;title=Euros%20prediction%20(3)"><i class="fa-brands fa-reddit fa-lg" title="Share on Reddit" style="color:#383838" aria-label="reddit"></i></a>
</center>



 ]]></description>
  <category>Bayesian statistics</category>
  <category>Miscellanea</category>
  <guid>https://gianluca.statistica.it/blog/2021-06-26-euros-prediction-(3)/</guid>
  <pubDate>Fri, 25 Jun 2021 23:00:00 GMT</pubDate>
</item>
<item>
  <title>Euros prediction (2)</title>
  <link>https://gianluca.statistica.it/blog/2021-06-24-euros-prediction-(2)/</link>
  <description><![CDATA[ 
<!-- This creates a site-wide situation -- if privacy is set on a page it persists across the website -->
<div id="ucl-consent-ui"></div>
<script>
window.uclConsentSettings = {
  persistConsent: true,    // keeps consent in localStorage
  autoHideBanner: true     // hide banner after consent
};
</script>

<!-- This blocks the cookies and complies with regulation -->
<script src="../../js/ucl-consent.blocker.min.js?v=1758018871"></script>
<script src="../../js/ucl-consent.ui-full.min.js?v=1758019745"></script>




<script src="../../js/ucl-consent.blocker.min.js"></script>
<script src="../../js/ucl-consent.ui-full.min.js"></script>




<p>This is a follow up on my <a href="../2021-06-14-euros-prediction/">previous post</a>. The group stage is now finished and I have updated the model as more games were being played. In particular, I have slightly changed the set up by adding a smooth time trend, modelled as a RW(2), based on the date in which each game in my dataset was played (considered as a unique identifier). This basically accounts for the “historical performance” by each team and has slightly improved the model performance, I think.</p>
<p><img src="https://gianluca.statistica.it/blog/2021-06-24-euros-prediction-(2)/images/time-trend.png" class="img-fluid"></p>
<p>I think the resulting trends make sense — for instance, Italy were rather poor at the beginning of the observation period (and going worse as time progresses towards successive failures in 2014-2018), but massively on the up in recent times (since Mancini took over — not to brag, but basically the Italian national team is run by the <a href="https://www.youtube.com/watch?v=ttId10L_lEY">Sampdoria golden generation</a>, so this was to be expected…). Many of these trends are kind of obvious, but I found a couple of them interesting — for example, the rise in Denmark historical performances may explain why the model perhaps tend to overestimate their current outcomes (though in the end, it didn’t get it too wrong, as they managed to go through).</p>
<p>The results for round 3 of the group stage are shown in the graph below (in red, I’ve highlighted the actual result of the game).</p>
<p><img src="https://gianluca.statistica.it/blog/2021-06-24-euros-prediction-(2)/images/round3.png" alt="" height="1200px"></p>
<p>I think I’m relatively happy with the performance of the model, considering that round 3 is when a lot of the tactical thinking may happen (particularly with teams that may know they go through with a draw — it was <em>that</em> bad this time, I thought, but I guess some of the games were a bit “<em>meh</em>”…). In quite a few cases, the outcome most likely according to the model was in fact the realised one. In others, while not bang on the money, the actual result was among the “dark tiles” (those that the model deemed relatively, if not most likely). Some predictions were quite off — for example, the model didn’t give much credit to Sweden beating Poland 3-2 (in fact, Poland were favourite to win the game, according to the model) and Germany were supposed to do much better than they actually did against Hungary (then again, most pundits probably would as well…).</p>
<p>I’ll try and make up the time to update the model for the knockout stage.</p>
<!--
This files first derives the relative path to the folder under which the page to share on selected social media is stored. 
Then it creates a series of sharing buttons --- currently implemented:
- Twitter
- Email
- LinkedIn
- Whatsapp
Others are fairly easy to create --- only need the fa icon of the relevant media + the combination of text that would be required
to automatically share in on that platform
-->
<br>
<center>
<a href="https://twitter.com/intent/tweet?url=https://gianluca.statistica.it/blog/2021-06-24-euros-prediction-(2)&amp;text=Euros%20prediction%20(2)"><i class="fa-brands fa-twitter fa-lg" title="Share on Twitter" style="color:#383838" aria-label="twitter"></i></a> &nbsp; <a href="mailto:?subject=Euros%20prediction%20(2)&amp;body=https://gianluca.statistica.it/blog/2021-06-24-euros-prediction-(2)"><i class="fa-solid fa-envelope fa-lg" title="Share by email" style="color:#383838" aria-label="envelope"></i></a> &nbsp; <a href="https://www.linkedin.com/shareArticle?url=https://gianluca.statistica.it/blog/2021-06-24-euros-prediction-(2)&amp;title=Euros%20prediction%20(2)"><i class="fa-brands fa-linkedin fa-lg" title="Share on LinkedIn" style="color:#383838" aria-label="linkedin"></i></a> &nbsp; <a href="https://web.whatsapp.com/send?text=Euros%20prediction%20(2)https://gianluca.statistica.it/blog/2021-06-24-euros-prediction-(2)"><i class="fa-brands fa-whatsapp fa-lg" title="Share on Whatsapp" style="color:#383838" aria-label="whatsapp"></i></a> &nbsp; <a href="https://reddit.com/submit?url=https://gianluca.statistica.it/blog/2021-06-24-euros-prediction-(2)&amp;title=Euros%20prediction%20(2)"><i class="fa-brands fa-reddit fa-lg" title="Share on Reddit" style="color:#383838" aria-label="reddit"></i></a>
</center>



 ]]></description>
  <category>Bayesian statistics</category>
  <category>Miscellanea</category>
  <guid>https://gianluca.statistica.it/blog/2021-06-24-euros-prediction-(2)/</guid>
  <pubDate>Wed, 23 Jun 2021 23:00:00 GMT</pubDate>
</item>
<item>
  <title>Euros prediction</title>
  <link>https://gianluca.statistica.it/blog/2021-06-14-euros-prediction/</link>
  <description><![CDATA[ 
<!-- This creates a site-wide situation -- if privacy is set on a page it persists across the website -->
<div id="ucl-consent-ui"></div>
<script>
window.uclConsentSettings = {
  persistConsent: true,    // keeps consent in localStorage
  autoHideBanner: true     // hide banner after consent
};
</script>

<!-- This blocks the cookies and complies with regulation -->
<script src="../../js/ucl-consent.blocker.min.js?v=1758018871"></script>
<script src="../../js/ucl-consent.ui-full.min.js?v=1758019745"></script>




<script src="../../js/ucl-consent.blocker.min.js"></script>
<script src="../../js/ucl-consent.ui-full.min.js"></script>




<p>I wasn’t going to do much about this (and probably, I shouldn’t have done anything and used my time more wisely…), but a couple of friends/colleagues have actually asked me if I had done it <em>and</em> Italy did so well in their first outing, that I was up last night to whip something up… <i class="fa-solid fa-face-smile-wink" aria-label="face-smile-wink"></i> (in case it’s not clear yet, yes: this is a post on using Bayesian modelling to predict the outcome of football games, specifically for the ongoing Euro championships).</p>
<p>So: it’s actually very fortunate that lots of the relevant data are fairly easy to get. Kaggle have a <a href="https://www.kaggle.com/martj42/international-football-results-from-1872-to-2017">dataset</a> including all international games from 1972 to 2021 (before the Euros began last week). They also have a <a href="https://www.kaggle.com/cashncarry/fifaworldranking">dataset</a> with the FIFA ranking for each of the national teams. And the games schedule is also available from a simple Google search.</p>
<p>These three datasets can be combined to create the actual data to analyse and use for prediction of the Euro championship games. In particular, I have constructed a “long” format data where each game is replicated twice and the two rows are from the “point of view” of each opponent — like below. I have filtered only the data from 2010 onward.</p>
<div class="cell">
<div class="cell-output cell-output-stdout">
<pre><code># A tibble: 5,384 × 17
      ID date       Team             Opponent          Goal tournament  Home  form diff_point diff_rank days_since_last city     country  rank total_points previous_points rank_date 
   &lt;int&gt; &lt;date&gt;     &lt;chr&gt;            &lt;chr&gt;            &lt;int&gt; &lt;chr&gt;      &lt;dbl&gt; &lt;dbl&gt;      &lt;int&gt;     &lt;int&gt;           &lt;dbl&gt; &lt;chr&gt;    &lt;chr&gt;   &lt;int&gt;        &lt;int&gt;           &lt;int&gt; &lt;date&gt;    
 1     1 2010-03-03 Albania          Northern Ireland     1 Friendly       1  5.39       -413       -57             109 Tirana   Albania    96          335             336 2010-03-03
 2     1 2010-03-03 Northern Ireland Albania              0 Friendly       0  2.09        413        57             109 Tirana   Albania    39          748             729 2010-03-03
 3     2 2010-03-03 Armenia          Belarus              1 Friendly       0  9.22        -80       -24             140 Antalya  Turkey    103          320             321 2010-03-03
 4     2 2010-03-03 Belarus          Armenia              3 Friendly       0  4.29         80        24             105 Antalya  Turkey     79          400             397 2010-03-03
 5     3 2010-03-03 Austria          Denmark              2 Friendly       1  6.37       -231       -23             105 Vienna   Austria    56          567             523 2010-03-03
 6     3 2010-03-03 Denmark          Austria              1 Friendly       0  6.84        231        23             140 Vienna   Austria    33          798             827 2010-03-03
 7     4 2010-03-03 Belgium          Croatia              0 Friendly       1 15.3        -559       -57             109 Brussels Belgium    68          491             491 2010-03-03
 8     4 2010-03-03 Croatia          Belgium              1 Friendly       0  6.88        559        57             109 Brussels Belgium    11         1050            1053 2010-03-03
 9     5 2010-03-03 Cyprus           Iceland              0 Friendly       1 10.9         140        25             140 Larnaca  Cyprus     66          495             471 2010-03-03
10     5 2010-03-03 Iceland          Cyprus               0 Friendly       0 10.1        -140       -25             109 Larnaca  Cyprus     91          355             349 2010-03-03
# … with 5,374 more rows</code></pre>
</div>
</div>
<p>In this table, <code>ID</code> is equal to <code>1</code> in the first two rows, to indicate that the first game is played between <code>Albania</code> and <code>Northern Ireland</code>. In the game, <code>Albania</code> scored <code>1</code>, while <code>Northern Ireland</code> scored <code>0</code>. The game was a <code>Friendly</code> match and because it was played in <code>Tirana</code>, <code>Albania</code>, the variable <code>Home</code> is set to <code>1</code> for <code>Albania</code> and <code>0</code> for their opponents. Also, using the FIFA ranking data, I’ve calculated the actual rank and total points <em>at the time of the game</em> and then reconstructed the difference in points and ranks between the two teams (respectively in the variables <code>diff_point</code> and <code>diff_rank</code>).</p>
<p>I’ve also computed the number of days since the last game was played by either teams involved (stored in the variable <code>days_since_last</code>). I’m using this in combination with another derived variable, <code>form</code>, which I have computed to give an indication of how good a run a team are having. In particular, <code>form</code> is defined as the weighted sum of the points accrued in the last 3 games, where the weights are computed as a function of the difference in “strength” (according to the total FIFA points each team had, going into the game). So, for each game I compute the proportion of points over the total for the two teams and use its inverse to weigh the number of points actually won in the game (3 for a win, 1 for a draw and 0 for a loss); this is meant to imply that if you beat a team that is way worse than you, that should count for much less than when you’re a crappy team and beat the World Champions…</p>
<p>With data formatted in this way, I’m ready to run a model that is based on a relatively standard format (and the specific Bayesian version we implemented <a href="../../research/football/">here</a>). The model assumes that the number of goals scored in each game is <img src="https://latex.codecogs.com/png.latex?y_%7Bg%7D"> in game <img src="https://latex.codecogs.com/png.latex?g=1,%5Cldots,G"> (because of the long format in which I’ve constructed the dataset, this is the same as assuming two variables, one for each team involved in the game). I model the observed data using a Poisson distributions, <img src="https://latex.codecogs.com/png.latex?y_%7Bg%7D%5Csim%5Cmbox%7BPoisson%7D(%5Ctheta_%7Bg%7D)"> with a structure on the distribution of the “scoring rates” <img src="https://latex.codecogs.com/png.latex?%5Ctheta_%7Bg%7D">: <img src="https://latex.codecogs.com/png.latex?%5Clog(%5Ctheta_%7Bg%7D)=%5Cbeta_0+%5Cbeta_1%5Cmbox%7BHome%7D_%7Bg%7D+%5Cbeta_2%5Cmbox%7BForm%7D_%7Bg%7D+%5Cbeta_3%5Cmbox%7BDiff%5C_point%7D_%7Bg%7D+%5Cbeta_4%5Cmbox%7BDiff%5C_rank%7D_%7Bg%7D+%5Cbeta_5%5Cmbox%7BDays%5C_since%5C_last%7D_%7Bg%7D+%5Cbeta_6%5Cmbox%7BTournament%7D_%7Bg%7D+%5Ctext%7Batt%7D_%7Bg%5Ctext%7BTeam%7D%5Bg%5D%7D+%5Ctext%7Bdef%7D_%7Bg%5Ctext%7BOpponent%7D%5Bg%5D%7D."></p>
<p>There’s a bunch of “fixed effects” (in fact, I am slightly abusing the notation here: <code>Tournament</code> is a categorical variable and so there are in fact a set of indicators to describe the incremental effect with respect to the baseline type of tournament) and two “random effects” (<img src="https://latex.codecogs.com/png.latex?%5Ctext%7Batt%7D_%7Bg%5Ctext%7BTeam%7D%5Bg%5D%7D"> and <img src="https://latex.codecogs.com/png.latex?%5Ctext%7Bdef%7D_%7Bg%5Ctext%7BOpponent%7D%5Bg%5D%7D">) that represent, respectively, the attacking strength of the first team and the defending strength of their opponent. These are modelled assuming an exchangeable structure, which implies a level of correlation across the output for the two teams involved in the same game.</p>
<p>The rows we want to predict are stored at the end of the dataset — in this case the number of goals scored is set to <code>NA</code>.</p>
<div class="cell">
<div class="cell-output cell-output-stdout">
<pre><code># A tibble: 72 × 17
      ID date       Team        Opponent     Goal tournament  Home  form diff_point diff_rank days_since_last city             country     rank total_points previous_points rank_date 
   &lt;int&gt; &lt;date&gt;     &lt;chr&gt;       &lt;chr&gt;       &lt;int&gt; &lt;chr&gt;      &lt;dbl&gt; &lt;dbl&gt;      &lt;int&gt;     &lt;int&gt;           &lt;dbl&gt; &lt;chr&gt;            &lt;chr&gt;      &lt;int&gt;        &lt;int&gt;           &lt;int&gt; &lt;date&gt;    
 1  2657 2021-06-11 Italy       Turkey         NA Official       1 15.2         137        22               7 Rome             Italy          7         1642            1642 2021-05-27
 2  2657 2021-06-11 Turkey      Italy          NA Official       0 11.9        -137       -22               8 Rome             Italy         29         1505            1505 2021-05-27
 3  2658 2021-06-12 Switzerland Wales          NA Official       0 15.5          36         4               9 Baku             Azerbaijan    13         1606            1606 2021-05-27
 4  2658 2021-06-12 Wales       Switzerland    NA Official       0  7.66        -36        -4               7 Baku             Azerbaijan    17         1570            1570 2021-05-27
 5  2659 2021-06-12 Denmark     Finland        NA Official       1 13.4         221        44               6 Copenhagen       Denmark       10         1631            1631 2021-05-27
 6  2659 2021-06-12 Finland     Denmark        NA Official       0  0          -221       -44               8 Copenhagen       Denmark       54         1410            1410 2021-05-27
 7  2660 2021-06-12 Belgium     Russia         NA Official       0 12.6         321        37               6 Saint Petersburg Russia         1         1783            1783 2021-05-27
 8  2660 2021-06-12 Russia      Belgium        NA Official       1  7.81       -321       -37               7 Saint Petersburg Russia        38         1462            1462 2021-05-27
 9  2661 2021-06-13 Croatia     England        NA Official       0  6.56        -81       -10               7 London           England       14         1605            1605 2021-05-27
10  2661 2021-06-13 England     Croatia        NA Official       1 17.1          81        10               7 London           England        4         1686            1686 2021-05-27
# … with 62 more rows</code></pre>
</div>
</div>
<p>I used <a href="https://www.r-inla.org/"><code>INLA</code></a> to fit the model — this is very quick and I could re-use some of the code I have written for <span class="citation" data-cites="Tsakosetal:2017">Tsakos et al. (2018)</span>, so that was handy… <a href="https://www.leonardoegidi.com/euro-2020">Leonardo</a> has done something <strong>very</strong> similar, using <a href="https://mc-stan.org/users/interfaces/rstan"><code>rstan</code></a>.</p>
<p>The nice thing about this model is that you can predict a weath of outputs and summarise them nicely. For instance, one important metric is of course based on the estimate of the (posterior) probability that either of the two teams would win the match, or the probability of a draw. But with the Bayesian model I set up, I can also predict the full joint posterior predictive distribution of the number of goals scored by the two teams and visualise it (together with the <em>marginal</em> distributions, which are depicted as the top and side histograms below).</p>
<p><img src="https://gianluca.statistica.it/blog/2021-06-14-euros-prediction/images/analysis-1.png" width="1000" height="1000"></p>
<p>For example, the emphatic 3-0 win for Italy against Turkey was, numerically, not the most likely outcome, according to the model. The probability that Italy would win was estimated to be very high (almost 60%), but the model (and perhaps, I too) was expecting Italy to score fewer goals (the most likely outcome was a 1-0 win for Italy). The observed result was <strong>not</strong> impossible under the model (it had almost an 8% chance as opposed to a 13.5% chance for the modal result).</p>
<p>The prediction can be obtained for the first round of games in the Group stage (as below). As the games are played, I can update the dataset and re-run the model (which in INLA is pretty fast) to predict the next round of games (according to the historic data as well as the last performances).</p>
<p><img src="https://gianluca.statistica.it/blog/2021-06-14-euros-prediction/images/all_preds-1.png" width="1000" height="1000"> <img src="https://gianluca.statistica.it/blog/2021-06-14-euros-prediction/images/all_preds-2.png" width="1000" height="1000"> <img src="https://gianluca.statistica.it/blog/2021-06-14-euros-prediction/images/all_preds-3.png" width="1000" height="1000"> <img src="https://gianluca.statistica.it/blog/2021-06-14-euros-prediction/images/all_preds-4.png" width="1000" height="1000"> <img src="https://gianluca.statistica.it/blog/2021-06-14-euros-prediction/images/all_preds-5.png" width="1000" height="1000"> <img src="https://gianluca.statistica.it/blog/2021-06-14-euros-prediction/images/all_preds-6.png" width="1000" height="1000"> <img src="https://gianluca.statistica.it/blog/2021-06-14-euros-prediction/images/all_preds-7.png" width="1000" height="1000"> <img src="https://gianluca.statistica.it/blog/2021-06-14-euros-prediction/images/all_preds-8.png" width="1000" height="1000"> <img src="https://gianluca.statistica.it/blog/2021-06-14-euros-prediction/images/all_preds-9.png" width="1000" height="1000"> <img src="https://gianluca.statistica.it/blog/2021-06-14-euros-prediction/images/all_preds-10.png" width="1000" height="1000"> <img src="https://gianluca.statistica.it/blog/2021-06-14-euros-prediction/images/all_preds-11.png" width="1000" height="1000"> <img src="https://gianluca.statistica.it/blog/2021-06-14-euros-prediction/images/all_preds-12.png" width="1000" height="1000"></p>
<p>I can make some comments on the (other) games that have already been played:</p>
<ul>
<li>Switzerland-Wales (1-1). The model was predicting a slight higher chance of winning for Switzerland (that’s kind of contrary to <a href="https://www.leonardoegidi.com/euro-2020">Leonardo’s prediction</a>) and was favouring a 1-0 win for them. However, both a 0-0 draw and the actual 1-1 result were relatively highly likely (with probabilities of 13.5% and 13%, respectively).<br>
</li>
<li>Denmark-Finland (0-1). The model doesn’t get that right — but this was a very special game for what has happened to <a href="https://www.theguardian.com/football/2021/jun/13/he-was-gone-christian-eriksen-had-cardiac-arrest-denmark-doctor-says">Christian Eriksen</a>. The model gives the Danes the home advantage and uses the fact that they are ranked much higher than the Finn’s team and so predicts a 2-0 as the most likely outcome. The observed 0-1 was rather unlikely given the model, but again, I don’t think this game was in any way generated by the “normal” process that the model assumes…<br>
</li>
<li>Belgium-Russia (3-0). That’s an interesting one — I think mostly because of the slightly over-estimation of Russian’s chances. Belgium were still favourite (with a probability of winning of over 50%), but I think in terms of prediction of the goal scored, the modal value for Russia was kind of overestimated due to the home effect (the game was played in St Petersburg), which in fact never materialised.<br>
</li>
<li>England-Croatia (1-0). Here the model was bang-on. The most likely outcome was the one that was, in fact, observed. England were favourite to win by a large margin and even a bigger win (2-0) would have been supported by the model.<br>
</li>
<li>Austria-North Macedonia (3-1). The actual outcome wasn’t very likely according to the model, which supported mostly a 1-0 win for the Austrian. Other outputs would have been aligned to the model’s prediction, including a 0-0 or a 1-1 draw, which probably wouldn’t have been out of North Macedonia’s grasp (they conceded two relatively late goals).<br>
</li>
<li>Netherlands-Ukraine (3-2). The Dutch were highly tipped to win by the model (giving them almost a 60% chance). But the numerical outcome of the game was a lot more uncertain. A 2-0 win for Netherlands was given almost a 10% chance by the model (the Dutch were 2-0 up before the Ukraininans came back to 2-2, which was given a 4.5% chance by the model).</li>
</ul>
<p>Of the games that are yet to be played, France-Germany is an interesting one: the model seems to suggest a very tight outcome (given they are both <strong>very</strong> strong teams) and the modal outcome is a 1-1 draw. However, it gives Germany a slightly higher chance overall — I think this is due to the fact that the game is played in Munich (so Germany take advantage of the “home effect” — though the number of fans allowed in the stadium is of course reduced…) <em>and</em> that Germany are historically very good in “official” competitions (e.g.&nbsp;the Euros or the World Cup).</p>
<!--
This files first derives the relative path to the folder under which the page to share on selected social media is stored. 
Then it creates a series of sharing buttons --- currently implemented:
- Twitter
- Email
- LinkedIn
- Whatsapp
Others are fairly easy to create --- only need the fa icon of the relevant media + the combination of text that would be required
to automatically share in on that platform
-->
<br>
<center>
<a href="https://twitter.com/intent/tweet?url=https://gianluca.statistica.it/blog/2021-06-14-euros-prediction&amp;text=Euros%20prediction"><i class="fa-brands fa-twitter fa-lg" title="Share on Twitter" style="color:#383838" aria-label="twitter"></i></a> &nbsp; <a href="mailto:?subject=Euros%20prediction&amp;body=https://gianluca.statistica.it/blog/2021-06-14-euros-prediction"><i class="fa-solid fa-envelope fa-lg" title="Share by email" style="color:#383838" aria-label="envelope"></i></a> &nbsp; <a href="https://www.linkedin.com/shareArticle?url=https://gianluca.statistica.it/blog/2021-06-14-euros-prediction&amp;title=Euros%20prediction"><i class="fa-brands fa-linkedin fa-lg" title="Share on LinkedIn" style="color:#383838" aria-label="linkedin"></i></a> &nbsp; <a href="https://web.whatsapp.com/send?text=Euros%20predictionhttps://gianluca.statistica.it/blog/2021-06-14-euros-prediction"><i class="fa-brands fa-whatsapp fa-lg" title="Share on Whatsapp" style="color:#383838" aria-label="whatsapp"></i></a> &nbsp; <a href="https://reddit.com/submit?url=https://gianluca.statistica.it/blog/2021-06-14-euros-prediction&amp;title=Euros%20prediction"><i class="fa-brands fa-reddit fa-lg" title="Share on Reddit" style="color:#383838" aria-label="reddit"></i></a>
</center>




<div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-bibliography"><h2 class="anchored quarto-appendix-heading">References</h2><div id="refs" class="references csl-bib-body hanging-indent" data-entry-spacing="0">
<div id="ref-Tsakosetal:2017" class="csl-entry">
Tsakos, A, S Narayanan, I Kosmidis, G Baio, M Cucuringu, G Whitaker, and F Király. 2018. <span>“Modelling Outcomes of Soccer Matches.”</span> <em>Machine Learning</em>. https://doi.org/<a href="https://doi.org/10.1007/s10994-018-5741-1">https://doi.org/10.1007/s10994-018-5741-1</a>.
</div>
</div></section></div> ]]></description>
  <category>Bayesian statistics</category>
  <category>Miscellanea</category>
  <guid>https://gianluca.statistica.it/blog/2021-06-14-euros-prediction/</guid>
  <pubDate>Sun, 13 Jun 2021 23:00:00 GMT</pubDate>
</item>
<item>
  <title>The duke of hazard</title>
  <link>https://gianluca.statistica.it/blog/2021-05-22-the-duke-of-hazard/</link>
  <description><![CDATA[ 
<!-- This creates a site-wide situation -- if privacy is set on a page it persists across the website -->
<div id="ucl-consent-ui"></div>
<script>
window.uclConsentSettings = {
  persistConsent: true,    // keeps consent in localStorage
  autoHideBanner: true     // hide banner after consent
};
</script>

<!-- This blocks the cookies and complies with regulation -->
<script src="../../js/ucl-consent.blocker.min.js?v=1758018871"></script>
<script src="../../js/ucl-consent.ui-full.min.js?v=1758019745"></script>




<script src="../../js/ucl-consent.blocker.min.js"></script>
<script src="../../js/ucl-consent.ui-full.min.js"></script>




<div style="float: left;margin-right: 20px; margin-bottom:0px;">
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="https://gianluca.statistica.it/blog/2021-05-22-the-duke-of-hazard/hazard.jpg" class="img-fluid figure-img" width="600"></p>
</figure>
</div>
</div>
</div>
</div>
<p>More changes to <a href="https://gianluca.statistica.it/software/survhe/"><code>survHE</code></a>. Earlier this week, I gave a talk at the <a href="https://www.ispor.org/conferences-education/conferences/past-conferences/ispor-2021/program/program">Virtual Ispor US conference</a> (our panel was W11). In preparation for the panel (and other things I was doing anyway), I got to talk to colleagues and thought a bit more of how survival modelling in HTA is kind of weird and “special”…</p>
<p>In particular, I realised how <code>survHE</code> doesn’t give by default any real information about the hazard and the cumulative hazard functions — this isn’t entirely true, because once the survival curve has been estimated (which is the whole point of <code>survHE</code>!) then <img src="https://latex.codecogs.com/png.latex?h(t)"> and <img src="https://latex.codecogs.com/png.latex?H(t)"> can be derived analytically in many cases, or at least numerically.</p>
<p>But I had not planned for a graphical representation of these two functions, which in fact is not really good practice, because they can be very helpful in understanding the model, particularly in the extrapolation portion (more on this <a href="https://www.jstatsoft.org/article/view/v095i14">here</a> and in the <a href="http://nicedsu.org.uk/wp-content/uploads/2016/03/NICE-DSU-TSD-Survival-analysis.updated-March-2013.v2.pdf">NICE guidelines</a>, among other places).</p>
<p>So, I’ve changed the code on the <code>devel</code> branch of the <code>survHE</code> <a href="https://github.com/giabaio/survHE/tree/devel">GitHub repository</a> so that the <code>plot</code> function now has an extra option <code>what</code>, which allows the user to choose whether the graph should depict <img src="https://latex.codecogs.com/png.latex?S(t)">, <img src="https://latex.codecogs.com/png.latex?h(t)"> or <img src="https://latex.codecogs.com/png.latex?H(t)">.</p>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb1-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(survHE)</span></code></pre></div></div>
</div>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb2" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb2-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Fits a simple model to the built-in dataset, using a Weibull distribution</span></span>
<span id="cb2-2">m<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">=</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">fit.models</span>(<span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Surv</span>(time,censored)<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">as.factor</span>(arm),data,<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"wei"</span>)</span>
<span id="cb2-3"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Plots the survival curve</span></span>
<span id="cb2-4"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">plot</span>(m)</span></code></pre></div></div>
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="https://gianluca.statistica.it/blog/2021-05-22-the-duke-of-hazard/unnamed-chunk-4-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb3" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb3-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Plots the hazard curve</span></span>
<span id="cb3-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">plot</span>(m,<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">what=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"hazard"</span>)</span></code></pre></div></div>
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="https://gianluca.statistica.it/blog/2021-05-22-the-duke-of-hazard/unnamed-chunk-4-2.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb4" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb4-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Plots the cumulative hazard curve</span></span>
<span id="cb4-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">plot</span>(m,<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">what=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"cumhazard"</span>)</span></code></pre></div></div>
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="https://gianluca.statistica.it/blog/2021-05-22-the-duke-of-hazard/unnamed-chunk-4-3.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
<p>The hazard curve is approximated by computing <em>numerically</em> the derivative of the cumulative hazard function.</p>
<!--
This files first derives the relative path to the folder under which the page to share on selected social media is stored. 
Then it creates a series of sharing buttons --- currently implemented:
- Twitter
- Email
- LinkedIn
- Whatsapp
Others are fairly easy to create --- only need the fa icon of the relevant media + the combination of text that would be required
to automatically share in on that platform
-->
<br>
<center>
<a href="https://twitter.com/intent/tweet?url=https://gianluca.statistica.it/blog/2021-05-22-the-duke-of-hazard&amp;text=The%20duke%20of%20hazard"><i class="fa-brands fa-twitter fa-lg" title="Share on Twitter" style="color:#383838" aria-label="twitter"></i></a> &nbsp; <a href="mailto:?subject=The%20duke%20of%20hazard&amp;body=https://gianluca.statistica.it/blog/2021-05-22-the-duke-of-hazard"><i class="fa-solid fa-envelope fa-lg" title="Share by email" style="color:#383838" aria-label="envelope"></i></a> &nbsp; <a href="https://www.linkedin.com/shareArticle?url=https://gianluca.statistica.it/blog/2021-05-22-the-duke-of-hazard&amp;title=The%20duke%20of%20hazard"><i class="fa-brands fa-linkedin fa-lg" title="Share on LinkedIn" style="color:#383838" aria-label="linkedin"></i></a> &nbsp; <a href="https://web.whatsapp.com/send?text=The%20duke%20of%20hazardhttps://gianluca.statistica.it/blog/2021-05-22-the-duke-of-hazard"><i class="fa-brands fa-whatsapp fa-lg" title="Share on Whatsapp" style="color:#383838" aria-label="whatsapp"></i></a> &nbsp; <a href="https://reddit.com/submit?url=https://gianluca.statistica.it/blog/2021-05-22-the-duke-of-hazard&amp;title=The%20duke%20of%20hazard"><i class="fa-brands fa-reddit fa-lg" title="Share on Reddit" style="color:#383838" aria-label="reddit"></i></a>
</center>



 ]]></description>
  <category>Health economics</category>
  <category>R</category>
  <category>Software</category>
  <guid>https://gianluca.statistica.it/blog/2021-05-22-the-duke-of-hazard/</guid>
  <pubDate>Fri, 21 May 2021 23:00:00 GMT</pubDate>
</item>
<item>
  <title>What if there’s no censoring?…</title>
  <link>https://gianluca.statistica.it/blog/2021-05-14-no-censoring/</link>
  <description><![CDATA[ 
<!-- This creates a site-wide situation -- if privacy is set on a page it persists across the website -->
<div id="ucl-consent-ui"></div>
<script>
window.uclConsentSettings = {
  persistConsent: true,    // keeps consent in localStorage
  autoHideBanner: true     // hide banner after consent
};
</script>

<!-- This blocks the cookies and complies with regulation -->
<script src="../../js/ucl-consent.blocker.min.js?v=1758018871"></script>
<script src="../../js/ucl-consent.ui-full.min.js?v=1758019745"></script>




<script src="../../js/ucl-consent.blocker.min.js"></script>
<script src="../../js/ucl-consent.ui-full.min.js"></script>




<p><a href="https://www.linkedin.com/in/philip-cooney-6688b6142/?originalSubdomain=ie">Philip Cooney</a> has alerted me to a slight inconsistency in <a href="https://gianluca.statistica.it/software/survhe/"><code>survHE</code></a>. Basically, he was trying to work in a setting where the data contain no censoring, using the HMC/<code>rstan</code> models generated by <code>survHE</code>. All works OK when using some of the models implemented, but failed when trying to fit the Gamma, Generalised Gamma and Generalised F.</p>
<p>The reason for this is that, for simplicity (and actually, our empirical tests show that computational run-time is much reduced) these models construct the log-likelihood by separating the set of individuals who are fully observed from the one of individuals who are censored. Basically, the model splits the data into <img src="https://latex.codecogs.com/png.latex?%5Cboldsymbol%7By%7D=(y%5E%7B%5Crm%7Bobs%7D%7D,y%5E%7B%5Crm%7Bcens%7D%7D)">, when <img src="https://latex.codecogs.com/png.latex?y%5E%7B%5Crm%7Bcens%7D%7D"> is a latent parameter and then considers <img src="https://latex.codecogs.com/png.latex?y%5E%7B%5Crm%7Bobs%7D%7D_i%20%5Csim%20p(y%5E%7B%5Crm%7Bobs%7D%7D%5Cmid%20%5Cmu_i,%5Calpha)%20%5Cqquad%20%7B%5Csf%20and%7D%20%5Cqquad%20g(%5Cmu_i)%20=%20%5Cboldsymbol%7BX%7D%5E%7B%5Crm%7Bobs%7D%7D_i%20%5Cboldsymbol%5Cbeta"> and <img src="https://latex.codecogs.com/png.latex?y%5E%7B%5Crm%7Bcens%7D%7D_i%20%5Csim%20p(y%5E%7B%5Crm%7Bcens%7D%7D%5Cmid%20%5Cmu_i,%5Calpha)%20%5Cqquad%20%7B%5Csf%20and%7D%20%5Cqquad%20g(%5Cmu_i)%20=%20%5Cboldsymbol%7BX%7D%5E%7B%5Crm%7Bobs%7D%7D_i%20%5Cboldsymbol%5Cbeta%20+%20%5Clog(d_i),"> where <img src="https://latex.codecogs.com/png.latex?d_i"> is the censored time (so the point at which the individuals have exited from the study without experiencing the event).</p>
<p>Because the two variables share the parameters, effectively the estimates account for censoring in this formulation. But, for these three models, <code>survHE</code> couldn’t handle in its default implementation, the case in which the number of censored data was 0.</p>
<p>Philip and I have fixed the code and I’ve now updated the <a href="https://github.com/giabaio/survHE/tree/devel">GitHub <code>devel</code> version</a> — I’ve upped the version number to 1.1.3 and included Philip as a contributor.</p>
<!--
This files first derives the relative path to the folder under which the page to share on selected social media is stored. 
Then it creates a series of sharing buttons --- currently implemented:
- Twitter
- Email
- LinkedIn
- Whatsapp
Others are fairly easy to create --- only need the fa icon of the relevant media + the combination of text that would be required
to automatically share in on that platform
-->
<br>
<center>
<a href="https://twitter.com/intent/tweet?url=https://gianluca.statistica.it/blog/2021-05-14-no-censoring&amp;text=What%20if%20there's%20no%20censoring?..."><i class="fa-brands fa-twitter fa-lg" title="Share on Twitter" style="color:#383838" aria-label="twitter"></i></a> &nbsp; <a href="mailto:?subject=What%20if%20there's%20no%20censoring?...&amp;body=https://gianluca.statistica.it/blog/2021-05-14-no-censoring"><i class="fa-solid fa-envelope fa-lg" title="Share by email" style="color:#383838" aria-label="envelope"></i></a> &nbsp; <a href="https://www.linkedin.com/shareArticle?url=https://gianluca.statistica.it/blog/2021-05-14-no-censoring&amp;title=What%20if%20there's%20no%20censoring?..."><i class="fa-brands fa-linkedin fa-lg" title="Share on LinkedIn" style="color:#383838" aria-label="linkedin"></i></a> &nbsp; <a href="https://web.whatsapp.com/send?text=What%20if%20there's%20no%20censoring?...https://gianluca.statistica.it/blog/2021-05-14-no-censoring"><i class="fa-brands fa-whatsapp fa-lg" title="Share on Whatsapp" style="color:#383838" aria-label="whatsapp"></i></a> &nbsp; <a href="https://reddit.com/submit?url=https://gianluca.statistica.it/blog/2021-05-14-no-censoring&amp;title=What%20if%20there's%20no%20censoring?..."><i class="fa-brands fa-reddit fa-lg" title="Share on Reddit" style="color:#383838" aria-label="reddit"></i></a>
</center>



 ]]></description>
  <category>Bayesian statistics</category>
  <category>Health economics</category>
  <category>R</category>
  <guid>https://gianluca.statistica.it/blog/2021-05-14-no-censoring/</guid>
  <pubDate>Thu, 13 May 2021 23:00:00 GMT</pubDate>
</item>
<item>
  <title>Heading there</title>
  <link>https://gianluca.statistica.it/blog/2021-04-12-heading-there/</link>
  <description><![CDATA[ 
<!-- This creates a site-wide situation -- if privacy is set on a page it persists across the website -->
<div id="ucl-consent-ui"></div>
<script>
window.uclConsentSettings = {
  persistConsent: true,    // keeps consent in localStorage
  autoHideBanner: true     // hide banner after consent
};
</script>

<!-- This blocks the cookies and complies with regulation -->
<script src="../../js/ucl-consent.blocker.min.js?v=1758018871"></script>
<script src="../../js/ucl-consent.ui-full.min.js?v=1758019745"></script>




<script src="../../js/ucl-consent.blocker.min.js"></script>
<script src="../../js/ucl-consent.ui-full.min.js"></script>




<div style="float: left;margin-right: 20px;margin-top: -0px;margin-bottom:0px;">
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="https://gianluca.statistica.it/blog/2021-04-12-heading-there/oval.png" class="img-fluid figure-img" width="800"></p>
</figure>
</div>
</div>
</div>
</div>
<p>This is, in many ways, <strong>very</strong> old news — but last summer (sic!) I applied for and was made the new Head of Department of UCL Statistical Science (and I <strong>think</strong> — checks in place — for the first time since the department was founded in 1911, the post has gone to somebody who isn’t British or from a Commonwealth country, of which I’m very proud — again, pending checks…). I have been in talks about it for quite some time (the incumbent told me, more or less verbatim: “<em>You’re probably going to <strong>hate</strong> it, but: would you like to be the next head?</em>” — my reply was something like “<em>You’re not really selling it very well, you do know that, don’t you?…</em>”).</p>
<p>Anyway, it turns out he did sell it to me and I decided to go for it. The process we have in our department is to allow a <em>huge</em> lead time between being appointed and actually being in post (which I will be officially from September 2021). So <em>technically</em> I think it’s way too soon to start complaining or even moaning about what the job entails, although I found it very interesting that I received almost twice as many commiserations than I had congratulations for getting the job… In fact, I am finding the lead time very useful to learn the details before I actually have the power to screw things up… And I’m using some of it to photoshop images of the Oval Office with the inevitable (UCL) flag waving as well as massive picture of me (in this case, captaining Italy to World Cup win in 2006).</p>
<p>And, to be honest, I’m still in the phase where this is all very exciting and I’m getting into the job with enthusiasm and (kind of confused, but certainly well-meaning) ideas — some of which we’re already starting to implement. These include a podcast series with some cool formats for something like “In conversation with…”. I’ve watched the first one we recorded and I’m really excited about this and look forward to when we’re ready to release the series!</p>
<p>There’s lots happening right now — including quite some effort in establishing and consolidating our PhD studentships offer (see <a href="https://www.ucl.ac.uk/statistics/ucl-epsrc-mathematical-sciences-doctoral-studentships-competition">here</a>, for example — the deadline is on the 25 April, so hurry, if you’re interested!). And, we’re looking into recruiting faculty members into our department, while the two newest recruit will join us formally (and, sadly, still virtually…) this coming week. This is all framed into a move to eventually link up very closely the UCL departments of Mathematics and Statistical Science into the “<a href="https://www.ucl.ac.uk/mathematical-statistical-sciences/">Institute of Mathematical and Statistical Sciences</a>” (IMSS) — we’re hoping to make it the centre of aggregation for all maths and stats at UCL (with a view to actually dominate London first and then we’ll take it from there… <i class="fa-solid fa-face-smile-wink" aria-label="face-smile-wink"></i>). We are making new and very interesting collaborations across the two departments, including with the <a href="https://www.ucl.ac.uk/chimera/">CHIMERA group</a>. And we’re launching new <a href="https://www.ucl.ac.uk/prospective-students/undergraduate/degrees/data-science-bsc">BSc programmes in Data Science</a>. And we have ideas to improve our equality, diversity and inclusion strategy (this is very important to me, but I’m also glad one of our colleagues is so good and with her eyes firmly on the ball as to keep me on my toes and help me steer in the right direction).</p>
<p>Of course, in many ways this is just appropriation of lots of work being done by the “previous” (well… current, really) administration — but I feel a bit <em>less bad</em> in taking (some of the) credit, because in the interim period, I’ve been contributed work on several of these (so yes: I’ve not just spend my whole time photoshopping things in the past few months!…). And most importantly, I hope that when the time comes, “heading” won’t quite like the one below… (and to be honest, I am not really sure which of the two I mean…).</p>
<div style="float: center;margin-top: 50px;margin-bottom:0px;">
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="https://gianluca.statistica.it/blog/2021-04-12-heading-there/header.gif" class="img-fluid figure-img" width="800"></p>
</figure>
</div>
</div>
</div>
</div>
<!--
This files first derives the relative path to the folder under which the page to share on selected social media is stored. 
Then it creates a series of sharing buttons --- currently implemented:
- Twitter
- Email
- LinkedIn
- Whatsapp
Others are fairly easy to create --- only need the fa icon of the relevant media + the combination of text that would be required
to automatically share in on that platform
-->
<br>
<center>
<a href="https://twitter.com/intent/tweet?url=https://gianluca.statistica.it/blog/2021-04-12-heading-there&amp;text=Heading%20there"><i class="fa-brands fa-twitter fa-lg" title="Share on Twitter" style="color:#383838" aria-label="twitter"></i></a> &nbsp; <a href="mailto:?subject=Heading%20there&amp;body=https://gianluca.statistica.it/blog/2021-04-12-heading-there"><i class="fa-solid fa-envelope fa-lg" title="Share by email" style="color:#383838" aria-label="envelope"></i></a> &nbsp; <a href="https://www.linkedin.com/shareArticle?url=https://gianluca.statistica.it/blog/2021-04-12-heading-there&amp;title=Heading%20there"><i class="fa-brands fa-linkedin fa-lg" title="Share on LinkedIn" style="color:#383838" aria-label="linkedin"></i></a> &nbsp; <a href="https://web.whatsapp.com/send?text=Heading%20therehttps://gianluca.statistica.it/blog/2021-04-12-heading-there"><i class="fa-brands fa-whatsapp fa-lg" title="Share on Whatsapp" style="color:#383838" aria-label="whatsapp"></i></a> &nbsp; <a href="https://reddit.com/submit?url=https://gianluca.statistica.it/blog/2021-04-12-heading-there&amp;title=Heading%20there"><i class="fa-brands fa-reddit fa-lg" title="Share on Reddit" style="color:#383838" aria-label="reddit"></i></a>
</center>



 ]]></description>
  <category>Miscellanea</category>
  <category>Perso</category>
  <guid>https://gianluca.statistica.it/blog/2021-04-12-heading-there/</guid>
  <pubDate>Sun, 11 Apr 2021 23:00:00 GMT</pubDate>
</item>
</channel>
</rss>
