<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;CkUCRn87fip7ImA9WhBbGEo.&quot;"><id>tag:blogger.com,1999:blog-9065396442320388284</id><updated>2013-05-18T10:44:27.106+01:00</updated><category term="gvisMaps" /><category term="bifurcation diagram" /><category term="ddply" /><category term="roxygen2" /><category term="Barnett Zehnwirth" /><category term="knitr" /><category term="books" /><category term="roxyPackage" /><category term="Bug" /><category term="Geo Chart" /><category term="gvisGeoChart" /><category term="Nationwide" /><category term="Windows" /><category term="Apple" /><category term="GIRO" /><category term="bursting" /><category term="ants" /><category term="stock market" /><category term="ChainLadder" /><category term="Job" /><category term="gvisLineChart" /><category term="Insurance" /><category term="motivation" /><category term="reshape" /><category term="moon-buggy" /><category term="delay differential equations" /><category term="simecol" /><category term="transform" /><category term="vision scientist" /><category term="Hodgkin-Huxley" /><category term="life expectancy" /><category term="Poster" /><category term="read serial" /><category term="packages" /><category term="table" /><category term="100m final" /><category term="shiny" /><category term="World Bank" /><category term="plyr" /><category term="linear model" /><category term="XPP" /><category term="optim" /><category term="k-means" /><category term="Presentations" /><category term="sitools" /><category term="read" /><category term="voronoi" /><category term="Cass Business School" /><category term="aggregate" /><category term="RJSONIO" /><category term="Reduce" /><category term="waterfall" /><category term="logistic map" /><category term="statistics" /><category term="Hopf-Bifurcation" /><category term="deSolve" /><category term="phtt" /><category term="Excel" /><category term="alpha  channel" /><category term="Claims" /><category term="Big data" /><category term="sqldf" /><category term="cluster analysis" /><category term="log-incremental" /><category term="data.table" /><category term="RStudio" /><category term="github" /><category term="adjustbox" /><category term="Motion Chart" /><category term="London" /><category term="pattern recognition" /><category term="Test Driven Analysis" /><category term="Tutorials" /><category term="deck.js" /><category term="fitdistrplus" /><category term="Koelner R User" /><category term="2013" /><category term="Train data" /><category term="Arduino" /><category term="survey" /><category term="R-2.14.0" /><category term="animation" /><category term="CambR" /><category term="Processing" /><category term="Risk" /><category term="Loriot" /><category term="geomap" /><category term="par.settings" /><category term="Dynamical Systems" /><category term="Open Data" /><category term="robotics" /><category term="attachfile2" /><category term="Deducer" /><category term="web framework" /><category term="tikzDevice" /><category term="lattice" /><category term="LondonR" /><category term="Tiger" /><category term="replace" /><category term="predator-prey" /><category term="Inflation" /><category term="random walk" /><category term="stochastic reserving" /><category term="cplm" /><category term="neuron" /><category term="latticeExtra" /><category term="bridge chart" /><category term="find and replace" /><category term="career" /><category term="Michael Bach" /><category term="sigma motion" /><category term="Analysis" /><category term="org-mode" /><category term="egg-timer" /><category term="installation" /><category term="tikz" /><category term="ggplot2" /><category term="McKinsey" /><category term="KölnR" /><category term="settings" /><category term="apply" /><category term="Cambridge R" /><category term="regression" /><category term="RSS" /><category term="fitdist" /><category term="Sweave" /><category term="Warwick" /><category term="treemap" /><category term="IT policy" /><category term="R in Insurance" /><category term="EUC" /><category term="Change management" /><category term="UseR2011" /><category term="News" /><category term="gvisComboChart" /><category term="Economist" /><category term="reporting" /><category term="image manipulation" /><category term="Rserve" /><category term="interactive" /><category term="gists" /><category term="dede" /><category term="CRAN" /><category term="Feigenbaum" /><category term="End User Computing" /><category term="initial view" /><category term="successively" /><category term="Hal Varian" /><category term="XML" /><category term="language" /><category term="earth quake data" /><category term="WDI" /><category term="game" /><category term="Lotka-Volterra" /><category term="data driven decision making" /><category term="gvisTable" /><category term="Kölner R Users" /><category term="IBNR" /><category term="Bridget Riley" /><category term="EU" /><category term="regular expressions" /><category term="googleVis" /><category term="fitdistr" /><category term="Copy and Paste" /><category term="legend" /><category term="Lloyd's" /><category term="Solvency II" /><category term="admin" /><category term="gvisSteppedAreaChart" /><category term="FitzHugh-Nagumo" /><category term="iBook G4" /><category term="Connections" /><category term="iris" /><category term="sweep" /><category term="map" /><category term="cartogram" /><category term="Sebastian Thrun" /><category term="Olympics 2012" /><category term="Interface" /><category term="UK house prices" /><category term="op-art" /><category term="credit rating" /><category term="Rcartogram" /><category term="Google Public Data Explorer" /><category term="find" /><category term="doBy" /><category term="digitizer" /><category term="Rook" /><category term="Conference" /><category term="Actuarial" /><category term="doughnut" /><category term="gWidgets" /><category term="visual illusion" /><category term="R in Finance" /><category term="snowmelt-runoff model" /><category term="pandoc" /><category term="Operating System" /><category term="gvisBubbleChart" /><category term="XeLaTeX" /><category term="vignette" /><category term="by" /><category term="fit distribution" /><category term="reserving" /><category term="spread sheet" /><category term="Seminar" /><category term="emacs" /><category term="Mac OS 10.4.11" /><category term="Guardian" /><category term="The RSA" /><category term="chart" /><category term="slidy" /><category term="options" /><category term="Germany" /><category term="rgb" /><category term="blogger" /><category term="gvisScatterChart" /><category term="Fusion table" /><category term="Markdown" /><category term="waterfall chart" /><category term="Soapbox" /><category term="Simon Sinek" /><category term="axis" /><category term="publishers" /><category term="gvisAnnotatedTimeLine" /><category term="gvisGeoMap" /><category term="R" /><title>mages' blog</title><subtitle type="html">I am the maintainer of the googleVis and ChainLadder packages and write mostly about R related topics such as performance benchmarking, price monitoring, claims reserving, dynamical systems, data analysis, interactive charts and reports</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://lamages.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://lamages.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Markus Gesmann</name><uri>https://plus.google.com/118201313972528070577</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-JwhCKZmguQs/AAAAAAAAAAI/AAAAAAAAASU/xOmDaEwnlbg/s512-c/photo.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>98</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/blogspot/rKuKM" /><feedburner:info uri="blogspot/rkukm" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;CEMBSHg4fip7ImA9WhBbFUw.&quot;"><id>tag:blogger.com,1999:blog-9065396442320388284.post-5557645015127079317</id><published>2013-05-14T07:20:00.000+01:00</published><updated>2013-05-14T07:20:59.636+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-05-14T07:20:59.636+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Insurance" /><category scheme="http://www.blogger.com/atom/ns#" term="Actuarial" /><category scheme="http://www.blogger.com/atom/ns#" term="Inflation" /><category scheme="http://www.blogger.com/atom/ns#" term="Claims" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><title>Claims Inflation - a known unknown </title><content type="html">Over the last year I worked with two colleagues of mine on the subject of inflation and claims inflation in particular. I didn't expect it to be such a challenging topic, but we ended up with more questions than answers. The key question and biggest challenge is to define what inflation, or indeed claims inflation actually is and how to measure it. We published a summary of our thoughts and findings in this &lt;a href="http://theactuary.com/features/2013/05/a-known-unknown/"&gt;month's issue of &lt;i&gt;The Actuary&lt;/i&gt;.&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Last year's &lt;a href="http://www.significancemagazine.org/details/webexclusive/4228261/RPI-versus-CPI-whats-the-difference-Why-does-it-matter-Will-it-make-you-poorer-o.html"&gt;discussion&lt;/a&gt; about the differences between the retail price index (RPI) and consumer price index (CPI) in the UK only exemplified the challenge.  The economist &lt;a href="http://timharford.com"&gt;Tim Harford&lt;/a&gt; illustrated the differences between the RPI and CPI with a simple example of price changes for a shirt and blouse in his Radio 4 programme &lt;i&gt;&lt;a href="http://www.bbc.co.uk/programmes/b006qshd"&gt;More or Less&lt;/a&gt;&lt;/i&gt;. The radio podcast is still available from the BBC. Start listening after about 18 minutes into the show. &lt;br /&gt;
&lt;br /&gt;
&lt;object type="audio/x-mpeg" data="http://downloads.bbc.co.uk/podcasts/radio4/moreorless/moreorless_20120817-1630a.mp3" width="400" height="20" autoplay="false"&gt;&lt;/object&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/mages/5535968.js"&gt;&lt;/script&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rKuKM/~4/9LQ_PJ8lBfQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://lamages.blogspot.com/feeds/5557645015127079317/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://lamages.blogspot.com/2013/05/claims-inflation-known-unknown.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/5557645015127079317?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/5557645015127079317?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rKuKM/~3/9LQ_PJ8lBfQ/claims-inflation-known-unknown.html" title="Claims Inflation - a known unknown " /><author><name>Markus Gesmann</name><uri>https://plus.google.com/118201313972528070577</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-JwhCKZmguQs/AAAAAAAAAAI/AAAAAAAAASU/xOmDaEwnlbg/s512-c/photo.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://lamages.blogspot.com/2013/05/claims-inflation-known-unknown.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUMGRH4zfyp7ImA9WhBUGUk.&quot;"><id>tag:blogger.com,1999:blog-9065396442320388284.post-335438741499573036</id><published>2013-05-07T17:17:00.000+01:00</published><updated>2013-05-07T17:17:05.087+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-05-07T17:17:05.087+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Insurance" /><category scheme="http://www.blogger.com/atom/ns#" term="R in Insurance" /><category scheme="http://www.blogger.com/atom/ns#" term="Conference" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><title>R in Insurance: Programme and Abstracts published</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://dl.dropbox.com/u/7586336/blogger/London.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="178" src="https://dl.dropbox.com/u/7586336/blogger/London.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
I am delighted to announce that the programme and abstracts for the first &lt;a href="http://www.cass.city.ac.uk/news-and-events/conferences/r-in-insurance"&gt;&lt;i&gt;&lt;strong&gt;R in Insurance&lt;/strong&gt;&lt;/i&gt;&lt;/a&gt; conference at Cass Business School in London, 15 July 2013, have been published. &lt;br /&gt;
&lt;br /&gt;
The conference committee received strong abstracts from academia and the industry, covering: &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Pricing&lt;/li&gt;
&lt;li&gt;Reserving&lt;/li&gt;
&lt;li&gt;Data mining&lt;/li&gt;
&lt;li&gt;Capital modelling&lt;/li&gt;
&lt;li&gt;Automate reporting&lt;/li&gt;
&lt;li&gt;Catastrophe modelling&lt;/li&gt;
&lt;li&gt;High-performance computing&lt;/li&gt;
&lt;li&gt;Software development management&lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://www.cass.city.ac.uk/news-and-events/conferences/r-in-insurance/registration-and-fees"&gt;Register&lt;/a&gt; by the end of May to get the early bird booking fee.&lt;br /&gt;
&lt;br /&gt;
We gratefully acknowledge the sponsorship of &lt;a href="http://www.mango-solutions.com/"&gt;&lt;strong&gt;Mango Solutions&lt;/strong&gt;&lt;/a&gt;  and &lt;a href="http://www.cybaea.net/"&gt;&lt;strong&gt;CYBAEA&lt;/strong&gt;&lt;/a&gt;, without whom the event wouldn't be possible.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;Programme and Abstracts&lt;/h3&gt;&lt;script src="https://gist.github.com/mages/56034db2cfdcfe881626.js"&gt;&lt;/script&gt;&lt;br /&gt;
&lt;a href="http://www.cass.city.ac.uk/news-and-events/conferences/r-in-insurance/registration-and-fees"&gt;Register&lt;/a&gt; by the end of May to get the early bird booking fee.&lt;img src="http://feeds.feedburner.com/~r/blogspot/rKuKM/~4/PjWmnBK5DSg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://lamages.blogspot.com/feeds/335438741499573036/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://lamages.blogspot.com/2013/05/r-in-insurance-programme-and-abstracts.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/335438741499573036?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/335438741499573036?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rKuKM/~3/PjWmnBK5DSg/r-in-insurance-programme-and-abstracts.html" title="R in Insurance: Programme and Abstracts published" /><author><name>Markus Gesmann</name><uri>https://plus.google.com/118201313972528070577</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-JwhCKZmguQs/AAAAAAAAAAI/AAAAAAAAASU/xOmDaEwnlbg/s512-c/photo.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://lamages.blogspot.com/2013/05/r-in-insurance-programme-and-abstracts.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEcNQn86cSp7ImA9WhBUE00.&quot;"><id>tag:blogger.com,1999:blog-9065396442320388284.post-3564354626185685397</id><published>2013-04-30T07:08:00.000+01:00</published><updated>2013-04-30T07:08:13.119+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-04-30T07:08:13.119+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="rgb" /><category scheme="http://www.blogger.com/atom/ns#" term="Tutorials" /><category scheme="http://www.blogger.com/atom/ns#" term="alpha  channel" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><title>How to change the alpha value of colours in R</title><content type="html">Often I like to reduce the &lt;a href="http://en.wikipedia.org/wiki/Alpha_compositing"&gt;alpha value&lt;/a&gt; (level of transparency) of colours to identify patterns of over-plotting when displaying lots of data points with R.  So, here is a tiny function that allows me to add an alpha value to a given vector of colours, e.g. a &lt;a href="http://cran.r-project.org/web/packages/RColorBrewer/index.html"&gt;RColorBrewer&lt;/a&gt; palette, using &lt;code&gt;col2rgb&lt;/code&gt; and &lt;code&gt;rgb&lt;/code&gt;, which has an argument for &lt;code&gt;alpha&lt;/code&gt;, in combination with the wonderful &lt;a href="http://lamages.blogspot.co.uk/2012/01/say-it-in-r-with-by-apply-and-friends.html"&gt;&lt;code&gt;apply&lt;/code&gt; and &lt;code&gt;sapply&lt;/code&gt; functions&lt;/a&gt;. &lt;br&gt;
&lt;br&gt;
&lt;script src="https://gist.github.com/mages/5339689.js"&gt;&lt;/script&gt;&lt;br&gt;
The example below illustrates how this function can be used with colours provided in different formats, thanks to the &lt;code&gt;col2rgb&lt;/code&gt; function. &lt;br&gt;
&lt;br&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-bvt2U2a3PyU/UX4Z_WiNsmI/AAAAAAAAA6E/K_YHc0yefdw/s1600/Rplot03.png" imageanchor="1"&gt;&lt;img border="0" height="261" src="http://2.bp.blogspot.com/-bvt2U2a3PyU/UX4Z_WiNsmI/AAAAAAAAA6E/K_YHc0yefdw/s400/Rplot03.png" width="400"&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://lamages.blogspot.com/2013/04/how-to-change-alpha-value-of-colours-in.html#more"&gt;Read more »&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rKuKM/~4/UjtLr28_iXQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://lamages.blogspot.com/feeds/3564354626185685397/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://lamages.blogspot.com/2013/04/how-to-change-alpha-value-of-colours-in.html#comment-form" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/3564354626185685397?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/3564354626185685397?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rKuKM/~3/UjtLr28_iXQ/how-to-change-alpha-value-of-colours-in.html" title="How to change the alpha value of colours in R" /><author><name>Markus Gesmann</name><uri>https://plus.google.com/118201313972528070577</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-JwhCKZmguQs/AAAAAAAAAAI/AAAAAAAAASU/xOmDaEwnlbg/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-bvt2U2a3PyU/UX4Z_WiNsmI/AAAAAAAAA6E/K_YHc0yefdw/s72-c/Rplot03.png" height="72" width="72" /><thr:total>4</thr:total><feedburner:origLink>http://lamages.blogspot.com/2013/04/how-to-change-alpha-value-of-colours-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEMDQHk-fip7ImA9WhBUFkg.&quot;"><id>tag:blogger.com,1999:blog-9065396442320388284.post-8215229199083195279</id><published>2013-04-23T07:34:00.000+01:00</published><updated>2013-05-04T09:34:31.756+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-05-04T09:34:31.756+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="shiny" /><category scheme="http://www.blogger.com/atom/ns#" term="Koelner R User" /><category scheme="http://www.blogger.com/atom/ns#" term="Kölner R Users" /><category scheme="http://www.blogger.com/atom/ns#" term="cluster analysis" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><title>Review: Kölner R Meeting 12 April 2013</title><content type="html">Our 5th Cologne R user group meeting was the best attended meeting so far, with 20 members finding their way to the Institute of Sociology for two talks by Diego de Castillo on &lt;a href="http://www.rstudio.com/shiny"&gt;shiny&lt;/a&gt; and &lt;a href="http://holtmeier.de/"&gt;Stephan Holtmeier&lt;/a&gt; on &lt;a href="http://en.wikipedia.org/wiki/Cluster_analysis"&gt;cluster analysis&lt;/a&gt;, followed by beer and schnitzel at &lt;a href="http://www.restaurant-lux.com/"&gt;the Lux&lt;/a&gt;, a gastropub nearby.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;Shiny&lt;/h3&gt;Diego gave an overview of the design principles behind &lt;a href="http://www.rstudio.com/shiny/"&gt;shiny&lt;/a&gt;, which provides a powerful API to build web apps in pure R. His explanation of the &lt;a href="http://rstudio.github.io/shiny/tutorial/#reactivity-overview"&gt;reactive programming model&lt;/a&gt; was particularly helpful to understand how shiny works under the hood and why it is so responsive. His live demonstrations of shiny even included &lt;a href="https://github.com/rstudio/shiny-server"&gt;shiny server&lt;/a&gt;, which he had running in a virtual machine. Diego's slides are available via our &lt;a href="http://files.meetup.com/3576292/intro-shiny.zip"&gt;Meetup site&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-ggTWnDpVJTs/UXJIBy9dpCI/AAAAAAAAA48/VJ-bFa9EYQ0/s1600/Untitled.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-ggTWnDpVJTs/UXJIBy9dpCI/AAAAAAAAA48/VJ-bFa9EYQ0/s320/Untitled.png" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Diego de Castillo: &lt;a href="http://files.meetup.com/3576292/intro-shiny.zip"&gt;Introduction to shiny&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
You can hear more from Diego and me at the &lt;a href="http://es.user2013.org/congresos/useR-2013/"&gt;UseR!2013&lt;/a&gt; conference in Albacete, where we will give a &lt;a href="http://es.user2013.org/congresos/useR-2013/Tutorials/Gesmann.html"&gt;googleVis tutorial&lt;/a&gt;. We will touch on &lt;a href="http://lamages.blogspot.co.uk/2013/02/first-steps-of-using-googlevis-on-shiny.html"&gt;googleVis on shiny&lt;/a&gt; as well. A dedicated &lt;a href="http://es.user2013.org/congresos/useR-2013/Tutorials/Paulson.html"&gt;shiny tutorial&lt;/a&gt; will be given in the afternoon by Josh and Winston from &lt;a href="http://www.rstudio.com/"&gt;RStudio&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;Cluster analysis&lt;/h3&gt;&lt;a href="http://holtmeier.de"&gt;Stephan Holtmeier&lt;/a&gt;, who is a psychologist by background, presented an introduction to cluster analysis with R, motivated by his &lt;a href="http://www.ki-bit.com/"&gt;work&lt;/a&gt; in analysing survey data. As a toy example he used a 360&amp;deg; feedback survey of a group of managers within a big company. In his example he wanted to understand the profile of those managers better. Stephan illustrated how a cluster analysis can help to identify groups of managers with similar strengths, e.g. for communication, leadership and/or performance. Depending on how he measured the distance between managers he could look for people who have similar levels of competency or a similar profile (correlation). Stephan also touched on the differences between hierarchical and centroid based cluster analysis, such as k-means. You can find Stephan's slides (in German) also on our &lt;a href="http://www.meetup.com/KoelnRUG/files/"&gt;Meetup site&lt;/a&gt;. &lt;br /&gt;
&lt;br /&gt;
&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-2ujuaKxbsmE/UXQsxcltGJI/AAAAAAAAA5M/3kqvrvcbi3M/s1600/Stephan_Holtmeier_Cluster-Analysis_April_2013.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-2ujuaKxbsmE/UXQsxcltGJI/AAAAAAAAA5M/3kqvrvcbi3M/s320/Stephan_Holtmeier_Cluster-Analysis_April_2013.png" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Stephan Holtmeier: &lt;a href="http://files.meetup.com/3576292/Stephan_Holtmeier_Cluster-Analysis_April_2013.pdf"&gt;Cluster Analysis with R&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
For more information on cluster analysis functions in R see also the &lt;a href="http://cran.r-project.org/web/views/Cluster.html"&gt;cluster task view on CRAN&lt;/a&gt;. If you would like to get an overview of how psychologists look at data, then check out &lt;a href="http://en.wikipedia.org/wiki/William_Revelle"&gt;William Revelle's&lt;/a&gt; &lt;a href="http://cran.r-project.org/web/packages/psych/vignettes/overview.pdf"&gt;vignette&lt;/a&gt; of the &lt;a href="http://cran.r-project.org/web/packages/psych/"&gt;psych package&lt;/a&gt;. Finally, if you are interested in how a k-means cluster analysis can be used for image manipulation, see an &lt;a href="http://lamages.blogspot.co.uk/2012/12/now-i-see-it-k-means-cluster-analysis.html"&gt;earlier post&lt;/a&gt; of mine.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;Next Kölner R meeting, 19 July 2013&lt;/h3&gt;The next meeting has been scheduled for 19 July.  &lt;a href="http://www.faes.de/"&gt;Günter Faes&lt;/a&gt; will present his experiences using the &lt;a href="http://cran.r-project.org/web/packages/XLConnect/index.html"&gt;XLConnect&lt;/a&gt; package as an interface between R and Excel. &lt;a href="http://www.cbs-edu.de/cbs/team/dietmar-janetzko/"&gt;Dietmar Janetzko&lt;/a&gt; agreed to present how he used R and Twitter to predict exchange rate movements. Of course, the evening will close with a few &lt;a href="http://en.wikipedia.org/wiki/K%C3%B6lsch_(beer)"&gt;Kölsch&lt;/a&gt; in a nearby beer-garden.&lt;br /&gt;
&lt;br /&gt;
Please get in touch if you would like to present and share your experience, or indeed if you have a request for a topic you &lt;a href="http://www.meetup.com/KoelnRUG/messages/boards/thread/33737882"&gt;would like to hear more about&lt;/a&gt;. For more details see also our &lt;a href="http://www.meetup.com/KoelnRUG/"&gt;Meetup page&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Thanks again to &lt;a href="http://www.blogger.com/berndweiss.net/"&gt;Bernd Weiß&lt;/a&gt; for hosting the event and &lt;a href="http://www.revolutionanalytics.com/"&gt;Revolution Analytics&lt;/a&gt; for their sponsorship. &lt;img src="http://feeds.feedburner.com/~r/blogspot/rKuKM/~4/U_HqB8NC15I" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://lamages.blogspot.com/feeds/8215229199083195279/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://lamages.blogspot.com/2013/04/review-kolner-r-meeting-12-april-2013.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/8215229199083195279?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/8215229199083195279?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rKuKM/~3/U_HqB8NC15I/review-kolner-r-meeting-12-april-2013.html" title="Review: Kölner R Meeting 12 April 2013" /><author><name>Markus Gesmann</name><uri>https://plus.google.com/118201313972528070577</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-JwhCKZmguQs/AAAAAAAAAAI/AAAAAAAAASU/xOmDaEwnlbg/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-ggTWnDpVJTs/UXJIBy9dpCI/AAAAAAAAA48/VJ-bFa9EYQ0/s72-c/Untitled.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://lamages.blogspot.com/2013/04/review-kolner-r-meeting-12-april-2013.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUQMSH86fSp7ImA9WhBVEUw.&quot;"><id>tag:blogger.com,1999:blog-9065396442320388284.post-4859305012504084049</id><published>2013-04-16T07:52:00.000+01:00</published><updated>2013-04-16T14:03:09.115+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-04-16T14:03:09.115+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Test Driven Analysis" /><category scheme="http://www.blogger.com/atom/ns#" term="Analysis" /><category scheme="http://www.blogger.com/atom/ns#" term="Soapbox" /><category scheme="http://www.blogger.com/atom/ns#" term="LondonR" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><title>Test Driven Analysis? </title><content type="html">At the last &lt;a href="http://www.londonr.org/"&gt;LondonR&lt;/a&gt; meeting Francine Bennett from &lt;a href="http://www.mastodonc.com/"&gt;Mastodon C&lt;/a&gt; shared some of &lt;a href="http://www.londonr.org/Presentations/Big%20Data%20comes%20to%20the%20NHS%20-%20Francine%20Bennett.pdf"&gt;her experience and findings&lt;/a&gt; from an analysis of a large &lt;a href="http://www.hscic.gov.uk/prescribing"&gt;prescriptions data set&lt;/a&gt; of the UK's national health service (NHS). However, it was her last slide, which I found the most thought provoking. It asked for the definition of the following term:&lt;br /&gt;
&lt;blockquote&gt;Test-driven analysis?&lt;/blockquote&gt;Francine explained that &lt;a href="http://en.wikipedia.org/wiki/Test-driven_development"&gt;test driven development&lt;/a&gt; (TDD) is a concept often used in software development for quality assurance and she wondered if a similar approach could be also used for data analysis. Unfortunately the audience couldn't provide her with &lt;i&gt;the&lt;/i&gt; answer, but many expressed that they face similar challenges. So do I.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-BVG5NsJgmfg/UWq7toGM47I/AAAAAAAAA4s/vAmv4wL0R_w/s1600/photo-1.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-BVG5NsJgmfg/UWq7toGM47I/AAAAAAAAA4s/vAmv4wL0R_w/s320/photo-1.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Indeed, how do I go about test driven analysis? How do I know that I haven't made a mistake, when I start an analysis of a new data set? Well, I don't. But I try to mitigate risks. Similar to TDD, I consider which outputs I should expect from my analysis. Those outputs form the test scenarios of my analysis. Basically I try to write down everything I know, before I start working with the data, e.g.&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;any other data sets or reports I can use for cross referencing,&lt;/li&gt;
&lt;li&gt;any &lt;a href="http://en.wikipedia.org/wiki/Back-of-the-envelope_calculation"&gt;back-of-the-envelope&lt;/a&gt; analysis I can carry out to provide ballpark answers,&lt;/li&gt;
&lt;li&gt;any relativities and ratios which should hold true,&lt;/li&gt;
&lt;li&gt;any known boundaries and thresholds,&lt;/li&gt;
&lt;li&gt;test scenarios for my code with small well known data, for which I know the outcome,&lt;/li&gt;
&lt;li&gt;names of experts, who could sense check and peer review my output.&lt;/li&gt;
&lt;/ul&gt;But most importantly: I try to think long and hard which questions I want to answer, following the advice of &lt;a href="http://en.wikipedia.org/wiki/John_Tukey"&gt;John Tukey&lt;/a&gt;: &lt;i&gt;Far better an approximate answer to the right question, which is often vague, than an exact answer to the wrong question, which can always be made precise.&lt;/i&gt; &lt;img src="http://feeds.feedburner.com/~r/blogspot/rKuKM/~4/ukPbHUDgPFQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://lamages.blogspot.com/feeds/4859305012504084049/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://lamages.blogspot.com/2013/04/test-driven-analysis.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/4859305012504084049?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/4859305012504084049?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rKuKM/~3/ukPbHUDgPFQ/test-driven-analysis.html" title="Test Driven Analysis? " /><author><name>Markus Gesmann</name><uri>https://plus.google.com/118201313972528070577</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-JwhCKZmguQs/AAAAAAAAAAI/AAAAAAAAASU/xOmDaEwnlbg/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-BVG5NsJgmfg/UWq7toGM47I/AAAAAAAAA4s/vAmv4wL0R_w/s72-c/photo-1.JPG" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://lamages.blogspot.com/2013/04/test-driven-analysis.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkEGQX4yfCp7ImA9WhBWFEQ.&quot;"><id>tag:blogger.com,1999:blog-9065396442320388284.post-7444898288006319452</id><published>2013-04-09T07:57:00.000+01:00</published><updated>2013-04-09T07:57:00.094+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-04-09T07:57:00.094+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="googleVis" /><category scheme="http://www.blogger.com/atom/ns#" term="gvisLineChart" /><category scheme="http://www.blogger.com/atom/ns#" term="Tutorials" /><category scheme="http://www.blogger.com/atom/ns#" term="gvisComboChart" /><category scheme="http://www.blogger.com/atom/ns#" term="axis" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><title>How to set axis options in googleVis</title><content type="html">Setting axis options in &lt;a href="http://code.google.com/p/google-motion-charts-with-r/"&gt;googleVis&lt;/a&gt; charts can be a bit tricky. Here I present two examples where I set several options to customise the layout of a line and combo chart with two axes.&lt;br&gt;
&lt;br&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-7vl1e5s0YbQ/UV_rPY40FeI/AAAAAAAAA3k/sJTww8rAJdg/s1600/Untitled.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="165" src="http://2.bp.blogspot.com/-7vl1e5s0YbQ/UV_rPY40FeI/AAAAAAAAA3k/sJTww8rAJdg/s400/Untitled.png" width="400"&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;
The parameters have to be set in line with the &lt;a href="https://developers.google.com/chart/"&gt;Google Chart Tools API&lt;/a&gt;, which uses a JavaScript syntax. In googleVis chart options are set via a list in the &lt;code&gt;options&lt;/code&gt; argument. Some of the list items can be a bit more complex, often wrapped in &lt;code&gt;{}&lt;/code&gt; brackets, e.g. for various formatting options or in &lt;code&gt;[]&lt;/code&gt; brackets, if there are multiple series to consider. Within those brackets sub-options are set via argument : value, using the &lt;code&gt;:&lt;/code&gt; character for assignments. &lt;br&gt;
&lt;br&gt;
There are many other options as part of the &lt;a href="https://developers.google.com/chart/interactive/docs/reference"&gt;Google Chart Tools API&lt;/a&gt;, which are not supported by googleVis yet, such as &lt;a href="https://developers.google.com/chart/interactive/docs/roles"&gt;columns roles&lt;/a&gt;, &lt;a href="https://developers.google.com/chart/interactive/docs/gallery/controls"&gt;controls and dashboards&lt;/a&gt;, etc. Please get in touch if you have ideas in this regard and/or would like to collaborate.&lt;br&gt;
&lt;br&gt;
In my first example I display two series of dummy data in a line chart with two axes. The left hand scale is in percentages and the right hand scale in amounts. Note in the code below how I set the various parameters and the placements of the different kinds of brackets.&lt;br&gt;
&lt;iframe frameborder="0" height="550" src="https://dl.dropbox.com/u/7586336/blogger/twoaxislinechart.html" width="600"&gt;Loading ...&lt;/iframe&gt;&lt;a href="http://lamages.blogspot.com/2013/04/how-to-set-axis-options-in-googlevis.html#more"&gt;Read more »&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rKuKM/~4/mkCacDUSohc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://lamages.blogspot.com/feeds/7444898288006319452/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://lamages.blogspot.com/2013/04/how-to-set-axis-options-in-googlevis.html#comment-form" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/7444898288006319452?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/7444898288006319452?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rKuKM/~3/mkCacDUSohc/how-to-set-axis-options-in-googlevis.html" title="How to set axis options in googleVis" /><author><name>Markus Gesmann</name><uri>https://plus.google.com/118201313972528070577</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-JwhCKZmguQs/AAAAAAAAAAI/AAAAAAAAASU/xOmDaEwnlbg/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-7vl1e5s0YbQ/UV_rPY40FeI/AAAAAAAAA3k/sJTww8rAJdg/s72-c/Untitled.png" height="72" width="72" /><thr:total>5</thr:total><feedburner:origLink>http://lamages.blogspot.com/2013/04/how-to-set-axis-options-in-googlevis.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck8FQnc9eyp7ImA9WhBWFE0.&quot;"><id>tag:blogger.com,1999:blog-9065396442320388284.post-734866294096309447</id><published>2013-04-08T07:00:00.001+01:00</published><updated>2013-04-08T07:00:13.963+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-04-08T07:00:13.963+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="News" /><category scheme="http://www.blogger.com/atom/ns#" term="Kölner R Users" /><category scheme="http://www.blogger.com/atom/ns#" term="Soapbox" /><category scheme="http://www.blogger.com/atom/ns#" term="KölnR" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><title>Next Kölner R User Meeting: 12 April 2013</title><content type="html">&lt;p&gt;Quick reminder: The next Cologne R user group meeting is scheduled for this Friday, 12 April 2013. We will discuss &lt;a href="http://en.wikipedia.org/wiki/Cluster_analysis"&gt;cluster analysis&lt;/a&gt; and &lt;a href="http://www.rstudio.com/shiny/"&gt;shiny&lt;/a&gt;. Further details and the agenda are available on our &lt;a href="http://www.meetup.com/KoelnRUG/"&gt;KölnRUG Meetup site&lt;/a&gt;. Please sign up if you would like to come along. Notes from the last Cologne R user group meeting are available &lt;a href="http://lamages.blogspot.com/2013/02/review-kolner-r-meeting-6-february-2013.html"&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-XwQ3jHpoDs4/UV_3YKUqeGI/AAAAAAAAA30/Bjyt2-SNzaw/s1600/KoelnR_Aushang_12_April_2013.png" imageanchor="1" &gt;&lt;img border="0" src="http://3.bp.blogspot.com/-XwQ3jHpoDs4/UV_3YKUqeGI/AAAAAAAAA30/Bjyt2-SNzaw/s320/KoelnR_Aushang_12_April_2013.png" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;p&gt;Thanks also to &lt;a href="http://www.revolutionanalytics.com"&gt;Revolution Analytics&lt;/a&gt;, who  sponsors the Cologne R user group as part of their &lt;a href="http://www.revolutionanalytics.com/news-events/r-user-group/"&gt;vector programme&lt;/a&gt;.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;div align="center"&gt;&lt;iframe width="550" height="250" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.co.uk/maps?f=q&amp;amp;source=s_q&amp;amp;hl=en&amp;amp;geocode=&amp;amp;q=Greinstra%C3%9Fe,+K%C3%B6ln,+Deutschland&amp;amp;aq=1&amp;amp;oq=greinstr&amp;amp;sll=53.800651,-4.064941&amp;amp;sspn=21.718578,41.967773&amp;amp;t=m&amp;amp;ie=UTF8&amp;amp;hq=&amp;amp;hnear=Greinstra%C3%9Fe,+S%C3%BClz+50939+K%C3%B6ln,+Nordrhein-Westfalen,+Germany&amp;amp;ll=50.924138,6.936922&amp;amp;spn=0.013526,0.047121&amp;amp;z=14&amp;amp;output=embed"&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;small&gt;&lt;a href="http://maps.google.co.uk/maps?f=q&amp;amp;source=embed&amp;amp;hl=en&amp;amp;geocode=&amp;amp;q=Greinstra%C3%9Fe,+K%C3%B6ln,+Deutschland&amp;amp;aq=1&amp;amp;oq=greinstr&amp;amp;sll=53.800651,-4.064941&amp;amp;sspn=21.718578,41.967773&amp;amp;t=m&amp;amp;ie=UTF8&amp;amp;hq=&amp;amp;hnear=Greinstra%C3%9Fe,+S%C3%BClz+50939+K%C3%B6ln,+Nordrhein-Westfalen,+Germany&amp;amp;ll=50.924138,6.936922&amp;amp;spn=0.013526,0.047121&amp;amp;z=14" style="color:#0000FF;text-align:left"&gt;View Larger Map&lt;/a&gt;&lt;/small&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rKuKM/~4/bWuWqusd8jw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://lamages.blogspot.com/feeds/734866294096309447/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://lamages.blogspot.com/2013/04/next-kolner-r-user-meeting-12-april-2013.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/734866294096309447?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/734866294096309447?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rKuKM/~3/bWuWqusd8jw/next-kolner-r-user-meeting-12-april-2013.html" title="Next Kölner R User Meeting: 12 April 2013" /><author><name>Markus Gesmann</name><uri>https://plus.google.com/118201313972528070577</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-JwhCKZmguQs/AAAAAAAAAAI/AAAAAAAAASU/xOmDaEwnlbg/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-XwQ3jHpoDs4/UV_3YKUqeGI/AAAAAAAAA30/Bjyt2-SNzaw/s72-c/KoelnR_Aushang_12_April_2013.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://lamages.blogspot.com/2013/04/next-kolner-r-user-meeting-12-april-2013.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEMHQn46fip7ImA9WhBWEUk.&quot;"><id>tag:blogger.com,1999:blog-9065396442320388284.post-7853283814529641878</id><published>2013-04-02T08:10:00.000+01:00</published><updated>2013-04-05T07:13:53.016+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-04-05T07:13:53.016+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Soapbox" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><title>Top 10 tips to get started with R</title><content type="html">&lt;ol&gt;&lt;li&gt;Be motivated. R has a steep learning curve. Find a problem you can't solve otherwise. E.g. plotting multivariate data, a statistical analysis for which an R function exists already.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt; &lt;a href="http://cran.r-project.org/index.html"&gt;Download and install R&lt;/a&gt;. Get to know the R console. Learn how to install additional packages, how to access the history, how to use auto completion and open the help system. Review the &lt;a href="http://cran.r-project.org/doc/manuals/r-release/R-admin.html"&gt;R Installation and Administration&lt;/a&gt; manual and check out the &lt;a href="http://cran.r-project.org/other-docs.html"&gt;free books&lt;/a&gt; section on CRAN. &lt;br /&gt;
&lt;/li&gt;
&lt;li&gt; Get familiar with the R help files. They can appear cryptic at the start, but there is a structure to them. Read and re-read a couple of help files again and again. Look out for the input and output sections, execute the examples, run the demos, e.g. &lt;code&gt;demo(graphics)&lt;/code&gt;. Subscribe to &lt;a href="https://stat.ethz.ch/mailman/listinfo/r-help"&gt;R-help&lt;/a&gt; and read questions and answers, check out &lt;a href="http://stackoverflow.com/questions/tagged/r"&gt;stackoverflow&lt;/a&gt;, follow &lt;a href="http://www.r-bloggers.com/"&gt;blogs&lt;/a&gt;. Search with &lt;a href="http://rseek.org/"&gt;Rseek.org&lt;/a&gt;. &lt;br /&gt;
&lt;/li&gt;
&lt;li&gt; Learn how to get your data into R. The easiest way is usually via a CSV-file (CSV=comma separated values), using &lt;code&gt;read.csv&lt;/code&gt;. Look into &lt;a href="http://cran.r-project.org/web/packages/XLConnect/index.html"&gt;XLConnect&lt;/a&gt;, if you have to deal with spreadsheet files. Move on to write queries against data bases, e.g. using &lt;a href="http://cran.r-project.org/web/packages/RODBC/"&gt;RODBC&lt;/a&gt;. Skim through the &lt;a href="http://cran.r-project.org/doc/manuals/r-release/R-data.html"&gt;R Data Import/Export&lt;/a&gt; manual. &lt;br /&gt;
&lt;/li&gt;
&lt;li&gt; Try to understand the &lt;a href="http://en.wikibooks.org/wiki/R_Programming/Data_types"&gt;different data types in R&lt;/a&gt; and how to modify them.  What are the differences between a matrix and a data frame? What is a factor? What is a list? Think about the different use cases. Review the &lt;a href="http://cran.r-project.org/doc/manuals/r-release/R-intro.html"&gt;Introduction to R&lt;/a&gt; manual.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt; Do charts! Lots of charts. They are rewarding and keep you motivated. Be inspired by the &lt;a href="http://gallery.r-enthusiasts.com/"&gt;R Graph Gallery&lt;/a&gt;. Check out the following packages: &lt;a href="http://lattice.r-forge.r-project.org/"&gt;lattice&lt;/a&gt;, &lt;a href="http://cran.r-project.org/web/packages/plotrix/index.html"&gt;plotrix&lt;/a&gt;, &lt;a href="http://ggplot2.org/"&gt;ggplot2&lt;/a&gt;, &lt;a href="http://cran.r-project.org/web/packages/Deducer/index.html"&gt;deducer&lt;/a&gt;, &lt;a href="http://code.google.com/p/google-motion-charts-with-r/"&gt;googleVis&lt;/a&gt;.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt; Learn how you can modify and reshape data in R and apply functions on subsets using &lt;a href="http://lamages.blogspot.co.uk/2012/01/say-it-in-r-with-by-apply-and-friends.html"&gt;&lt;code&gt;by, apply, lapply, ave&lt;/code&gt;&lt;/a&gt;, &lt;a href="http://lamages.blogspot.co.uk/2012/02/reshape-function.html"&gt;reshape&lt;/a&gt;, &lt;a href="http://lamages.blogspot.co.uk/2012/04/sweeping-through-data-in-r.html"&gt;sweep&lt;/a&gt;,&lt;a href="http://r4stats.com/2013/01/22/comparing-tranformation-styles/"&gt; with, within&lt;/a&gt;, etc. Set aside a weekend to think about these functions. &lt;/li&gt;
&lt;li&gt; Write your R code into files instead of typing it all into the R console. Use an &lt;a href="http://www.sciviews.org/_rgui/projects/Editors.html"&gt;integrated development environment (IDE)&lt;/a&gt;, e.g. &lt;a href="http://ess.r-project.org/"&gt;ESS Emacs&lt;/a&gt;, &lt;a href="http://www.rstudio.com/"&gt;RStudio&lt;/a&gt;, &lt;a href="http://www.walware.de/goto/statet"&gt;StatET Eclipse&lt;/a&gt;.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt; Understand the &lt;a href="http://cran.r-project.org/doc/contrib/Lemon-kickstart/kr_rfunc.html"&gt;concept of functions.&lt;/a&gt; Write a function, which gives "Hello World" back. Modify it, so it has an input argument NAME and it prints "Hello NAME". Review the code of existing R functions. Copy from existing code.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt; Document your code! Start your code by explaining what you want to achieve and only code that much, then write down the next step in plain English and code again.   How will you know that your code does what you want it to do? &lt;a href="http://journal.r-project.org/archive/2011-1/RJournal_2011-1_Wickham.pdf"&gt;Testing can help&lt;/a&gt;. Think about your &lt;a href="http://google-styleguide.googlecode.com/svn/trunk/google-r-style.html"&gt;code style&lt;/a&gt; and how you will be &lt;a href="http://betterexplained.com/articles/a-visual-guide-to-version-control"&gt;versioning your files&lt;/a&gt;.&lt;br /&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;h3&gt;Bonus tip&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;Be patient. Going mad? Check out the &lt;a href="http://www.burns-stat.com/documents/books/the-r-inferno/"&gt;R Inferno&lt;/a&gt; by &lt;a href="http://www.burns-stat.com/"&gt;Pat Burns&lt;/a&gt;.&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rKuKM/~4/w7aAsfBHYNQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://lamages.blogspot.com/feeds/7853283814529641878/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://lamages.blogspot.com/2013/04/top-10-tips-to-get-started-with-r.html#comment-form" title="11 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/7853283814529641878?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/7853283814529641878?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rKuKM/~3/w7aAsfBHYNQ/top-10-tips-to-get-started-with-r.html" title="Top 10 tips to get started with R" /><author><name>Markus Gesmann</name><uri>https://plus.google.com/118201313972528070577</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-JwhCKZmguQs/AAAAAAAAAAI/AAAAAAAAASU/xOmDaEwnlbg/s512-c/photo.jpg" /></author><thr:total>11</thr:total><feedburner:origLink>http://lamages.blogspot.com/2013/04/top-10-tips-to-get-started-with-r.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkIBSH0_fip7ImA9WhBXFEw.&quot;"><id>tag:blogger.com,1999:blog-9065396442320388284.post-8164705463514520531</id><published>2013-03-26T07:16:00.001Z</published><updated>2013-03-27T18:55:59.346Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-03-27T18:55:59.346Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Insurance" /><category scheme="http://www.blogger.com/atom/ns#" term="Actuarial" /><category scheme="http://www.blogger.com/atom/ns#" term="reserving" /><category scheme="http://www.blogger.com/atom/ns#" term="News" /><category scheme="http://www.blogger.com/atom/ns#" term="ChainLadder" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><title>ChainLadder 0.1.5-6 released on CRAN </title><content type="html">Last week we released version 0.1.5-6 of the &lt;a href="http://code.google.com/p/chainladder/"&gt;ChainLadder&lt;/a&gt; package on &lt;a href="http://cran.r-project.org/web/packages/ChainLadder/"&gt;CRAN&lt;/a&gt;. The ChainLadder package provides statistical models, which are typically used for the estimation of outstanding claims reserves in general insurance. The &lt;a href="http://cran.r-project.org/web/packages/ChainLadder/vignettes/ChainLadder.pdf"&gt;package vignette&lt;/a&gt; gives an overview of the package functionality.&lt;br /&gt;
&lt;br /&gt;
&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-SONTQSUddTA/UU1tK0t7QZI/AAAAAAAAA2E/SxSEr9hIPH0/s1600/Rplot.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="320" src="http://3.bp.blogspot.com/-SONTQSUddTA/UU1tK0t7QZI/AAAAAAAAA2E/SxSEr9hIPH0/s320/Rplot.png" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Output of &lt;code&gt;plot(MackChainLadder(GenIns))&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
Since the last CRAN release &lt;a href="http://trinostics.com/"&gt;Dan Murphy&lt;/a&gt; added new features to the &lt;code&gt;MackChainLadder&lt;/code&gt; function and we fixed a bug in &lt;code&gt;BootChainLadder&lt;/code&gt;. Here are he details:&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;New Features&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;The list output of the MackChainLadder function now includes the parameter risk and process risk breakdowns of the total risk estimate for the sum of projected losses across all origin years by development age.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;The Mack Method's recursive parameter risk calculation now enables Mack's original two-term formula (the default) and optionally the three-term formula found in Murphy's 1994 paper and in the 2006 paper by Buchwalder, Bühlmann, Merz, and Wüthrich.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;A few more Mack Method examples.&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;h3&gt;Bug Fixes&lt;/h3&gt;&lt;ul&gt;&lt;li&gt; The phi-scaling factor in BootChainLadder was incorrect. Instead of calculating the number of data items in the upper left triangle as n*(n+1)/2, n*(n-1)/2 was used. Thanks to Thomas Girodot for reporting this bug.&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
Please get in touch if you would like to collaborate or find any &lt;a href="http://code.google.com/p/chainladder/issues/list"&gt;issues or bugs&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Join me at the first &lt;a href="http://www.cass.city.ac.uk/news-and-events/conferences/r-in-insurance"&gt;R in Insurance conference&lt;/a&gt; at Cass Business School in London, 15 July 2013.&lt;br /&gt;
&lt;br /&gt;
&lt;img src="http://feeds.feedburner.com/~r/blogspot/rKuKM/~4/swB5ZvlMt0A" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://lamages.blogspot.com/feeds/8164705463514520531/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://lamages.blogspot.com/2013/03/chainladder-015-6-released-on-cran.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/8164705463514520531?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/8164705463514520531?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rKuKM/~3/swB5ZvlMt0A/chainladder-015-6-released-on-cran.html" title="ChainLadder 0.1.5-6 released on CRAN " /><author><name>Markus Gesmann</name><uri>https://plus.google.com/118201313972528070577</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-JwhCKZmguQs/AAAAAAAAAAI/AAAAAAAAASU/xOmDaEwnlbg/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-SONTQSUddTA/UU1tK0t7QZI/AAAAAAAAA2E/SxSEr9hIPH0/s72-c/Rplot.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://lamages.blogspot.com/2013/03/chainladder-015-6-released-on-cran.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck8BQXcyeip7ImA9WhBXEk4.&quot;"><id>tag:blogger.com,1999:blog-9065396442320388284.post-1959004021713792033</id><published>2013-03-25T07:40:00.000Z</published><updated>2013-03-25T17:00:50.992Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-03-25T17:00:50.992Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Insurance" /><category scheme="http://www.blogger.com/atom/ns#" term="Actuarial" /><category scheme="http://www.blogger.com/atom/ns#" term="R in Insurance" /><category scheme="http://www.blogger.com/atom/ns#" term="Conference" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><title>Submit a talk for the first R in Insurance conference</title><content type="html">The registration for the first &lt;a href="http://www.cass.city.ac.uk/news-and-events/conferences/r-in-insurance"&gt;R in Insurance&lt;/a&gt; is open and there is still time to &lt;a href="http://www.cass.city.ac.uk/news-and-events/conferences/r-in-insurance/paper-submission"&gt;submit a talk / lightning talk&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="https://dl.dropbox.com/u/7586336/R%20in%20Insurance/R_in_Insurance_Poster_2013.pdf" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="400" src="http://3.bp.blogspot.com/-cH5LXriRk4E/UU_-boIQDCI/AAAAAAAAA3E/FWHpZdgXito/s320/R_in_Insurance_Poster_2013.png" width="282" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;&lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;The conference will take place at Cass Business School in London on Monday, 15 July 2013. This is the Monday following the &lt;a href="http://www3.uclm.es/congresos/useR-2013/"&gt;useR! 2013 conference&lt;/a&gt; in Spain. Thus, if you come from overseas to Spain, why not stop in London on your way back? &lt;br /&gt;
&lt;br /&gt;
All further information and registration details are available on the &lt;a href="http://www.cass.city.ac.uk/news-and-events/conferences/r-in-insurance"&gt;Cass Business School conference site&lt;/a&gt;. &lt;img src="http://feeds.feedburner.com/~r/blogspot/rKuKM/~4/tg1dHzRrovk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://lamages.blogspot.com/feeds/1959004021713792033/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://lamages.blogspot.com/2013/03/submit-talk-for-first-r-in-insurance.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/1959004021713792033?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/1959004021713792033?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rKuKM/~3/tg1dHzRrovk/submit-talk-for-first-r-in-insurance.html" title="Submit a talk for the first R in Insurance conference" /><author><name>Markus Gesmann</name><uri>https://plus.google.com/118201313972528070577</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-JwhCKZmguQs/AAAAAAAAAAI/AAAAAAAAASU/xOmDaEwnlbg/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-cH5LXriRk4E/UU_-boIQDCI/AAAAAAAAA3E/FWHpZdgXito/s72-c/R_in_Insurance_Poster_2013.png" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://lamages.blogspot.com/2013/03/submit-talk-for-first-r-in-insurance.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0YMQHozfCp7ImA9WhBQF0w.&quot;"><id>tag:blogger.com,1999:blog-9065396442320388284.post-8650413876627151610</id><published>2013-03-19T07:40:00.000Z</published><updated>2013-03-19T16:39:41.484Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-03-19T16:39:41.484Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="shiny" /><category scheme="http://www.blogger.com/atom/ns#" term="CRAN" /><category scheme="http://www.blogger.com/atom/ns#" term="googleVis" /><category scheme="http://www.blogger.com/atom/ns#" term="News" /><category scheme="http://www.blogger.com/atom/ns#" term="World Bank" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><title>googleVis 0.4.2 with support for shiny released on CRAN</title><content type="html">The new version of &lt;a href="http://code.google.com/p/google-motion-charts-with-r"&gt;googleVis&lt;/a&gt; 0.4.2 is now available via &lt;a href="http://cran.r-project.org/web/packages/googleVis/"&gt;CRAN&lt;/a&gt;. Many thanks to all who provided feedback on &lt;a href="http://lamages.blogspot.co.uk/2013/02/first-steps-of-using-googlevis-on-shiny.html"&gt;version 0.4.0&lt;/a&gt; and particularly to Sebastian Campbell, John Maindonald and Aonan Zhang. As usual, if you find any issues or bugs, please send us an email or add a line to our &lt;a href="http://code.google.com/p/google-motion-charts-with-r/issues/list"&gt;online issues log&lt;/a&gt;.&lt;br&gt;
&lt;br&gt;
With version 0.4.0 we introduced support for googleVis on &lt;a href="http://www.rstudio.com/shiny/"&gt;shiny&lt;/a&gt;. See my &lt;a href="http://lamages.blogspot.co.uk/2013/02/first-steps-of-using-googlevis-on-shiny.html"&gt;previous post&lt;/a&gt; for more details and examples. &lt;br&gt;
&lt;br&gt;
The CRAN release of googleVis 0.4.2 has some further improvements: &lt;br&gt;
&lt;ul&gt;&lt;li&gt; New shiny and FAQ sections in &lt;a href="http://cran.r-project.org/web/packages/googleVis/vignettes/googleVis.pdf"&gt;package vignette&lt;/a&gt;&lt;/li&gt;
&lt;li&gt; Core charts (e.g. line, area, scatter, bar, column and combo charts) accept now also date variables for the x-axis &lt;br&gt;
&lt;/li&gt;
&lt;li&gt; Typos in the Stock and Andrew data sets have been fixed&lt;br&gt;
&lt;/li&gt;
&lt;li&gt; The &lt;a href="http://code.google.com/p/google-motion-charts-with-r/#Examples"&gt;WorldBank demo&lt;/a&gt; uses now the &lt;a href="http://cran.r-project.org/web/packages/WDI/index.html"&gt;WDI package&lt;/a&gt; to download data from the World Bank, see the R code below&lt;br&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;iframe src="https://dl.dropbox.com/u/7586336/blogger/WorldBankMotionChart_demo.html" frameborder="0" width="550" height="550"&gt;Loading&lt;/iframe&gt;&lt;br&gt;
&lt;a href="http://lamages.blogspot.com/2013/03/googlevis-042-with-support-for-shiny.html#more"&gt;Read more »&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rKuKM/~4/kP_PmssVsdg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://lamages.blogspot.com/feeds/8650413876627151610/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://lamages.blogspot.com/2013/03/googlevis-042-with-support-for-shiny.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/8650413876627151610?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/8650413876627151610?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rKuKM/~3/kP_PmssVsdg/googlevis-042-with-support-for-shiny.html" title="googleVis 0.4.2 with support for shiny released on CRAN" /><author><name>Markus Gesmann</name><uri>https://plus.google.com/118201313972528070577</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-JwhCKZmguQs/AAAAAAAAAAI/AAAAAAAAASU/xOmDaEwnlbg/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://lamages.blogspot.com/2013/03/googlevis-042-with-support-for-shiny.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkEESX4_fyp7ImA9WhBQEEo.&quot;"><id>tag:blogger.com,1999:blog-9065396442320388284.post-8753135291032909185</id><published>2013-03-12T07:49:00.000Z</published><updated>2013-03-12T07:50:08.047Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-03-12T07:50:08.047Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="optim" /><category scheme="http://www.blogger.com/atom/ns#" term="Tutorials" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><title>How to use optim in R</title><content type="html">A friend of mine asked me the other day how she could use the function &lt;code&gt;optim&lt;/code&gt; in R to fit data. Of course there are functions for fitting data in R  and I wrote about this &lt;a href="http://lamages.blogspot.co.uk/2011/12/fitting-distributions-with-r.html"&gt;earlier&lt;/a&gt;. However, she wanted to understand how to do this from scratch using &lt;code&gt;optim&lt;/code&gt;. &lt;br&gt;
&lt;br&gt;
The function &lt;code&gt;optim&lt;/code&gt; provides algorithms for general purpose optimisations and the documentation is perfectly reasonable, but I remember that it took me a little while to get my head around how to pass data and parameters to &lt;code&gt;optim&lt;/code&gt;. Thus, here are two simple examples.&lt;br&gt;
&lt;br&gt;
I start with a linear regression by minimising the residual sum of square and discuss how to carry out a maximum likelihood estimation in the second example. &lt;br&gt;
&lt;br&gt;
&lt;h3&gt;Minimise residual sum of squares&lt;/h3&gt;I start with an x-y data set, which I believe has a linear relationship and therefore I&amp;#39;d like to fit y against x by minimising the residual sum of squares.&lt;pre&gt;&lt;code&gt;dat=data.frame(x=c(1,2,3,4,5,6), 
               y=c(1,3,5,6,8,12))
&lt;/code&gt;&lt;/pre&gt;Next, I create a function that calculates the residual sum of square of my data against a linear model with two parameter. Think of &lt;code&gt;y = par[1] + par[2] * x&lt;/code&gt;.&lt;pre&gt;&lt;code&gt;min.RSS &amp;lt;- function(data, par) {
              with(data, sum((par[1] + par[2] * x - y)^2))
             }&lt;/code&gt;&lt;/pre&gt;Optim minimises a function by varying its parameters. The first argument of &lt;code&gt;optim&lt;/code&gt; are the parameters I&amp;#39;d like to vary, &lt;code&gt;par&lt;/code&gt; in this case; the second argument is the function to be minimised, &lt;code&gt;min.RSS&lt;/code&gt;. The tricky bit is to understand how to apply &lt;code&gt;optim&lt;/code&gt; to your data. The solution is the &lt;code&gt;...&lt;/code&gt; argument in &lt;code&gt;optim&lt;/code&gt;, which allows me to pass other arguments through to &lt;code&gt;min.RSS&lt;/code&gt;, here my data. Therefore I can use the following statement:&lt;pre&gt;&lt;code&gt;result &amp;lt;- optim(par = c(0, 1), min.RSS, data = dat)
# I find the optimised parameters in result$par
# the minimised RSS is stored in result$value
result
## $par
## [1] -1.267  2.029
## 
## $value
## [1] 2.819
## 
## $counts
## function gradient 
##       89       NA 
## 
## $convergence
## [1] 0
## 
## $message
## NULL&lt;/code&gt;&lt;/pre&gt;Let me plot the result:&lt;pre&gt;&lt;code&gt;plot(y ~ x, data = dat)
abline(a = result$par[1], b = result$par[2], col = &amp;quot;red&amp;quot;)&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-KyanWgvDSEs/US0uhzYTZtI/AAAAAAAAA0A/hJlWsZdhJvk/s1600/Rplot01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="275" src="http://4.bp.blogspot.com/-KyanWgvDSEs/US0uhzYTZtI/AAAAAAAAA0A/hJlWsZdhJvk/s400/Rplot01.png" width="400"&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://lamages.blogspot.com/2013/03/how-to-use-optim-in-r.html#more"&gt;Read more »&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rKuKM/~4/wC9f8lUbSnw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://lamages.blogspot.com/feeds/8753135291032909185/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://lamages.blogspot.com/2013/03/how-to-use-optim-in-r.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/8753135291032909185?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/8753135291032909185?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rKuKM/~3/wC9f8lUbSnw/how-to-use-optim-in-r.html" title="How to use optim in R" /><author><name>Markus Gesmann</name><uri>https://plus.google.com/118201313972528070577</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-JwhCKZmguQs/AAAAAAAAAAI/AAAAAAAAASU/xOmDaEwnlbg/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-KyanWgvDSEs/US0uhzYTZtI/AAAAAAAAA0A/hJlWsZdhJvk/s72-c/Rplot01.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://lamages.blogspot.com/2013/03/how-to-use-optim-in-r.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE8HSXg_eyp7ImA9WhBRFEs.&quot;"><id>tag:blogger.com,1999:blog-9065396442320388284.post-3518960527481491505</id><published>2013-03-05T07:00:00.000Z</published><updated>2013-03-05T07:00:38.643Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-03-05T07:00:38.643Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="doughnut" /><category scheme="http://www.blogger.com/atom/ns#" term="roxyPackage" /><category scheme="http://www.blogger.com/atom/ns#" term="roxygen2" /><category scheme="http://www.blogger.com/atom/ns#" term="End User Computing" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><title>Create an R package from a single R file with roxyPackage</title><content type="html">Documenting code can be a bit of a pain. Yet, the older (and wiser?) I get, the more I realise how important it is. When I was younger I said &amp;#39;documentation is for people without talent&amp;#39;. Well, I am clearly loosing my talent, as I sometimes struggle to understand what I programmed years ago. Thus, anything that soothes the pain of writing and maintaining documentation must be good and should help me to better understand my &amp;#39;old me&amp;#39; in the future. &lt;br&gt;
&lt;br&gt;
Ideally I want my R code and documentation in as few files as possible. A good start to achieve this is using &lt;a href="http://cran.r-project.org/web/packages/roxygen2/index.html"&gt;roxygen2&lt;/a&gt;, an R package which has been around for some time. It allows me to tie R code together with the documentation in the same file and helps considerably in maintaining R packages.&lt;br&gt;
&lt;br&gt;
The &lt;a href="http://cran.r-project.org/web/packages/roxyPackage/index.html"&gt;roxyPackage&lt;/a&gt; by &lt;a href="http://reaktanz.de/?c=home"&gt;Meik Michalke&lt;/a&gt; goes a step further, building on roxygen2. &lt;a href="http://r.reaktanz.de/pckg/roxyPackage/kRug-2013-02-06_roxyPackage.pdf"&gt;Meik presented&lt;/a&gt; his package at the &lt;a href="http://www.meetup.com/KoelnRUG/"&gt;Cologne R user group&lt;/a&gt; meeting a few weeks ago and I was intrigued by it. As I said in my &lt;a href="http://lamages.blogspot.co.uk/2013/02/review-kolner-r-meeting-6-february-2013.html"&gt;notes to the meeting&lt;/a&gt;, with roxyPackage I can create a package from a single file of R code and documentation. &lt;br&gt;
&lt;br&gt;
Here is an example of one R file to build a package using roxyPackage.  For my toy example I wrote a doughnut plot function in R, something which is &lt;a href="http://stackoverflow.com/questions/13615562/ggplot-donut-chart"&gt;clearly missing&lt;/a&gt; ;)&lt;br&gt;
&lt;br&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-P0iZEeHFpek/USjKrQShJtI/AAAAAAAAAzk/KlXPsErFBvM/s1600/Rplot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="304" src="http://3.bp.blogspot.com/-P0iZEeHFpek/USjKrQShJtI/AAAAAAAAAzk/KlXPsErFBvM/s320/Rplot.png" width="320"&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;
I took the basic pie chart function and amended it to plot another white disc in the middle. On top of the function code I wrote the help file documentation using the roxygen2 syntax. &lt;br&gt;
&lt;a href="http://lamages.blogspot.com/2013/03/create-r-package-from-single-r-file.html#more"&gt;Read more »&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rKuKM/~4/4RUpQlHFLT8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://lamages.blogspot.com/feeds/3518960527481491505/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://lamages.blogspot.com/2013/03/create-r-package-from-single-r-file.html#comment-form" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/3518960527481491505?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/3518960527481491505?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rKuKM/~3/4RUpQlHFLT8/create-r-package-from-single-r-file.html" title="Create an R package from a single R file with roxyPackage" /><author><name>Markus Gesmann</name><uri>https://plus.google.com/118201313972528070577</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-JwhCKZmguQs/AAAAAAAAAAI/AAAAAAAAASU/xOmDaEwnlbg/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-P0iZEeHFpek/USjKrQShJtI/AAAAAAAAAzk/KlXPsErFBvM/s72-c/Rplot.png" height="72" width="72" /><thr:total>5</thr:total><feedburner:origLink>http://lamages.blogspot.com/2013/03/create-r-package-from-single-r-file.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0IBSXs-fCp7ImA9WhBWEkU.&quot;"><id>tag:blogger.com,1999:blog-9065396442320388284.post-498035695456263865</id><published>2013-02-26T06:47:00.000Z</published><updated>2013-04-06T22:59:18.554+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-04-06T22:59:18.554+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="shiny" /><category scheme="http://www.blogger.com/atom/ns#" term="googleVis" /><category scheme="http://www.blogger.com/atom/ns#" term="map" /><category scheme="http://www.blogger.com/atom/ns#" term="gvisTable" /><category scheme="http://www.blogger.com/atom/ns#" term="animation" /><category scheme="http://www.blogger.com/atom/ns#" term="gvisScatterChart" /><category scheme="http://www.blogger.com/atom/ns#" term="Tutorials" /><category scheme="http://www.blogger.com/atom/ns#" term="RStudio" /><category scheme="http://www.blogger.com/atom/ns#" term="gvisGeoChart" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><title>First steps of using googleVis on shiny</title><content type="html">The guys at &lt;a href="http://www.rstudio.org/"&gt;RStudio&lt;/a&gt; have done a fantastic job with &lt;a href="http://www.rstudio.com/shiny/"&gt;shiny&lt;/a&gt;. It is really easy to build web apps with &lt;a href="http://www.r-project.org"&gt;R&lt;/a&gt; using shiny. With the help of Joe Cheng from RStudio we figured out a way to make &lt;a href="http://code.google.com/p/google-motion-charts-with-r/"&gt;googleVis&lt;/a&gt; work on shiny as well. This allows you to make use of the &lt;a href="https://developers.google.com/chart/"&gt;Google Charts Tools&lt;/a&gt; in your shiny app directly from R. What I present here are three initial examples which seem to work in most browsers. The third example even uses a neat trick to create an animated geo chart.&lt;br&gt;
&lt;br&gt;
&lt;a href="http://1.bp.blogspot.com/-bZnkbAYiP_E/USiZYRRVZgI/AAAAAAAAAzI/IELLGR4GiYY/s1600/Shiny.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="222" src="http://1.bp.blogspot.com/-bZnkbAYiP_E/USiZYRRVZgI/AAAAAAAAAzI/IELLGR4GiYY/s640/Shiny.png" width="587"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
However, before we upload the next version of googleVis to CRAN we decided to present a preview of version 0.4.0 here, asking for &lt;a href="mailto:rvisualisation@gmail.com?Subject=googleVis-0.4.0"&gt;feedback&lt;/a&gt;. It would not be fair on the guys behind CRAN to release something into the wild, only to be told by users within a few days that we missed something. Hence, you can get the new version of googleVis only from the &lt;a href="http://code.google.com/p/google-motion-charts-with-r/downloads/list"&gt;download page&lt;/a&gt; of our project site for the time being.&lt;br&gt;
&lt;br&gt;
You may have read the &lt;a href="http://blog.rstudio.org/2013/02/22/shiny-0-4-0-now-available/"&gt;post on RStudio&amp;#39;s blog&lt;/a&gt; that the shiny API changed slightly: the &lt;code&gt;reactivePlot&lt;/code&gt; and &lt;code&gt;reactiveText&lt;/code&gt; functions have been renamed to &lt;code&gt;renderPlot&lt;/code&gt; and &lt;code&gt;renderText&lt;/code&gt; with simplified input parameters. Thanks to Joe, there is now also a &lt;code&gt;renderGvis&lt;/code&gt; function as part of the googleVis package, which works in very much the same way as the other two.  &lt;br&gt;
&lt;br&gt;
To run the following examples you need shiny version 0.4.0 and googleVis version 0.4.0 or higher.  Note that the charts below are not screen shots, but real apps hosted on RStudio&amp;#39;s infrastructure.&lt;br&gt;
&lt;a href="http://lamages.blogspot.com/2013/02/first-steps-of-using-googlevis-on-shiny.html#more"&gt;Read more »&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rKuKM/~4/KlJwt3Wll6I" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://lamages.blogspot.com/feeds/498035695456263865/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://lamages.blogspot.com/2013/02/first-steps-of-using-googlevis-on-shiny.html#comment-form" title="16 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/498035695456263865?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/498035695456263865?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rKuKM/~3/KlJwt3Wll6I/first-steps-of-using-googlevis-on-shiny.html" title="First steps of using googleVis on shiny" /><author><name>Markus Gesmann</name><uri>https://plus.google.com/118201313972528070577</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-JwhCKZmguQs/AAAAAAAAAAI/AAAAAAAAASU/xOmDaEwnlbg/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-bZnkbAYiP_E/USiZYRRVZgI/AAAAAAAAAzI/IELLGR4GiYY/s72-c/Shiny.png" height="72" width="72" /><thr:total>16</thr:total><feedburner:origLink>http://lamages.blogspot.com/2013/02/first-steps-of-using-googlevis-on-shiny.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUYCQ3gyfyp7ImA9WhBSFE4.&quot;"><id>tag:blogger.com,1999:blog-9065396442320388284.post-3864571182394289919</id><published>2013-02-19T19:30:00.000Z</published><updated>2013-02-21T07:52:42.697Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-21T07:52:42.697Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Insurance" /><category scheme="http://www.blogger.com/atom/ns#" term="Cass Business School" /><category scheme="http://www.blogger.com/atom/ns#" term="News" /><category scheme="http://www.blogger.com/atom/ns#" term="R in Insurance" /><category scheme="http://www.blogger.com/atom/ns#" term="Conference" /><category scheme="http://www.blogger.com/atom/ns#" term="2013" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><title>Registration for 'R in Insurance' conference has opened </title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://dl.dropbox.com/u/7586336/blogger/London.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="170" src="https://dl.dropbox.com/u/7586336/blogger/London.jpg" width="600" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
The registration for the first conference on &lt;i&gt;&lt;strong&gt;R in Insurance&lt;/strong&gt;&lt;/i&gt; on Monday 15 July 2013 at &lt;a href="http://www.cass.city.ac.uk/news-and-events/conferences/r-in-insurance"&gt;Cass Business School in London has opened&lt;/a&gt;. &lt;br /&gt;
&lt;br /&gt;
The intended audience of the conference includes both academics and practitioners who are active or interested in the applications of R in insurance. &lt;br /&gt;
&lt;br /&gt;
The 2013 &lt;i&gt;&lt;strong&gt;R in Insurance&lt;/strong&gt;&lt;/i&gt; conference builds upon the success of the &lt;i&gt;&lt;a href="http://www.rinfinance.com/"&gt;R in Finance&lt;/a&gt;&lt;/i&gt; and &lt;i&gt;&lt;a href="https://www.rmetrics.org/"&gt;R/Rmetrics&lt;/a&gt;&lt;/i&gt; events. We expect invited keynote lectures by:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.ma.hw.ac.uk/~mcneil/"&gt;Professor Alexander McNeil&lt;/a&gt;, Department of Actuarial Science &amp; Statistics&lt;br /&gt;
Heriot-Watt University: &lt;i&gt;Implementing CreditRisk+ in R with the Faster Fourier Transform&lt;/i&gt;&lt;/li&gt;
&lt;li&gt; &lt;a href="http://www.lloyds.com/news-and-insight/lloyds-blog/our-experts/trevor-maynard"&gt;Trevor Maynard&lt;/a&gt;, Head of Exposure Management and Reinsurance, Lloyd's: &lt;i&gt;There is an R in Lloyd's&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;We invite you to submit a one-page abstract for consideration. Both academic and practitioner proposals related to R are encouraged.&lt;br /&gt;
&lt;br /&gt;
The submission deadline for abstracts is 28 March 2013. Please email your abstract (in txt or pdf format) to &lt;a href="mailto:rinsuranceconference@gmail.com"&gt;rinsuranceconference at gmail dot com&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
The conference committee consists of:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://bunhill.city.ac.uk/research/cassexperts.nsf/(expertsbyName)/80257346003B633B80257305004B7ABE?OpenDocument"&gt;Jens Perch Nielsen&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://bunhill.city.ac.uk/research/cassexperts.nsf/%28expertsbyName%29/80257346003B633B80257214003DCEF3?OpenDocument"&gt;Andreas Tsanakas&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dutangc.free.fr/"&gt;Christophe Dutang&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://lamages.blogspot.co.uk/"&gt;Markus Gesmann&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
Details about the registration and abstract submission are given on the new dedicated &lt;a href="http://www.cass.city.ac.uk/news-and-events/conferences/r-in-insurance"&gt;&lt;i&gt;R in Insurance&lt;/i&gt; page at Cass Business School&lt;/a&gt;. &lt;br /&gt;
&lt;br /&gt;
The organisers, &lt;a href="http://www.cass.city.ac.uk/experts/a.tsanakas"&gt;Andreas Tsanakas&lt;/a&gt; and &lt;a href="http://lamages.blogspot.com/"&gt;Markus Gesmann&lt;/a&gt;, gratefully acknowledge the sponsorship of &lt;a href="http://www.mango-solutions.com/"&gt;&lt;strong&gt;Mango Solutions&lt;/strong&gt;&lt;/a&gt;.&lt;img src="http://feeds.feedburner.com/~r/blogspot/rKuKM/~4/7IGgCC8Ur0s" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://lamages.blogspot.com/feeds/3864571182394289919/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://lamages.blogspot.com/2013/02/registration-for-r-in-insurance.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/3864571182394289919?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/3864571182394289919?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rKuKM/~3/7IGgCC8Ur0s/registration-for-r-in-insurance.html" title="Registration for 'R in Insurance' conference has opened " /><author><name>Markus Gesmann</name><uri>https://plus.google.com/118201313972528070577</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-JwhCKZmguQs/AAAAAAAAAAI/AAAAAAAAASU/xOmDaEwnlbg/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://lamages.blogspot.com/2013/02/registration-for-r-in-insurance.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUYDR3w_cCp7ImA9WhBSFE4.&quot;"><id>tag:blogger.com,1999:blog-9065396442320388284.post-660023673618545939</id><published>2013-02-15T13:47:00.000Z</published><updated>2013-02-21T07:52:56.248Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-21T07:52:56.248Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Insurance" /><category scheme="http://www.blogger.com/atom/ns#" term="News" /><category scheme="http://www.blogger.com/atom/ns#" term="Lloyd's" /><category scheme="http://www.blogger.com/atom/ns#" term="Job" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><category scheme="http://www.blogger.com/atom/ns#" term="London" /><title>New Data Scientist role at Lloyd's</title><content type="html">Lloyd's of London is looking for a Data Scientist as part of the Analysis team. See Lloyd's &lt;a href="http://jobs.lloyds.com/fe/tpl_lloyds01.asp?s=PyAxDIfSqHTyVvHqn&amp;amp;jobid=81827,6982498702&amp;amp;key=68190269&amp;amp;c=875262514822&amp;amp;pagestamp=seuarhkizesujvrfri"&gt;career web site&lt;/a&gt; for more details. &lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-B5Jn3MnCrjI/UMpWSf-TzMI/AAAAAAAAArA/CQVEja8VCPs/s1600/Rplot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-B5Jn3MnCrjI/UMpWSf-TzMI/AAAAAAAAArA/CQVEja8VCPs/s320/Rplot.png" width="212" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;img src="http://feeds.feedburner.com/~r/blogspot/rKuKM/~4/DlVLtS2uwXc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://lamages.blogspot.com/feeds/660023673618545939/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://lamages.blogspot.com/2013/02/new-data-scientist-role-at-lloyd.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/660023673618545939?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/660023673618545939?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rKuKM/~3/DlVLtS2uwXc/new-data-scientist-role-at-lloyd.html" title="New Data Scientist role at Lloyd&amp;#39;s" /><author><name>Markus Gesmann</name><uri>https://plus.google.com/118201313972528070577</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-JwhCKZmguQs/AAAAAAAAAAI/AAAAAAAAASU/xOmDaEwnlbg/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-B5Jn3MnCrjI/UMpWSf-TzMI/AAAAAAAAArA/CQVEja8VCPs/s72-c/Rplot.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://lamages.blogspot.com/2013/02/new-data-scientist-role-at-lloyd.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEYAR3s4eCp7ImA9WhBTF0o.&quot;"><id>tag:blogger.com,1999:blog-9065396442320388284.post-3004350548141620636</id><published>2013-02-12T17:49:00.000Z</published><updated>2013-02-13T16:15:46.530Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-13T16:15:46.530Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Koelner R User" /><category scheme="http://www.blogger.com/atom/ns#" term="roxyPackage" /><category scheme="http://www.blogger.com/atom/ns#" term="Kölner R Users" /><category scheme="http://www.blogger.com/atom/ns#" term="roxygen2" /><category scheme="http://www.blogger.com/atom/ns#" term="snowmelt-runoff model" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><title>Review: Kölner R Meeting 6 February 2013</title><content type="html">The fourth &lt;a href="http://www.meetup.com/KoelnRUG/"&gt;Cologne R user meeting&lt;/a&gt; took place last Wednesday at the Institute of Sociology. Thanks to &lt;a href="http://bweiss.fornax.uberspace.de"&gt;Bernd Weiß&lt;/a&gt; for hosting the event and &lt;a href="http://www.revolutionanalytics.com"&gt;Revolution Analytics&lt;/a&gt; for their sponsorship. &lt;br&gt;
&lt;br&gt;
We had two fantastic talks by Klaus Jacobi and M.eik Michalke. Klaus talked about &lt;i&gt;&lt;a href="https://dl.dropbox.com/u/3780726/Presentation_meetup/jacobi_presentation_meetup_R.html"&gt;Eliminating cloud pixels in satellite images via chronological interpolation&lt;/a&gt;&lt;/i&gt; and Meik presented his new &lt;i&gt;&lt;a href="http://reaktanz.de/?c=hacking&amp;amp;s=roxyPackage"&gt;roxyPackage&lt;/a&gt;&lt;/i&gt; package, which makes it even easier to maintain R packages with roxygen2.&lt;br&gt;
&lt;br&gt;
&lt;h3&gt;Eliminating cloud pixels in satellite images via chronological interpolation&lt;/h3&gt;Klaus gave a great case study about his consulting work as a water engineer in Asia, where he used R to analyse the snow melting process in the mountains of Pakistan. &lt;br&gt;
&lt;br&gt;
&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-Vmu0HiE1eU0/URlV8qwT1FI/AAAAAAAAAxs/iIKG7LzCxVE/s1600/img17.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="197" src="http://1.bp.blogspot.com/-Vmu0HiE1eU0/URlV8qwT1FI/AAAAAAAAAxs/iIKG7LzCxVE/s400/img17.png" width="400"&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Images of snow melting over time. Klaus Jacobi&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br&gt;
About half of the fresh water in some regions of Pakistan is sourced from snow meting during the spring season. The water is captured in dams and as the snow only melts slowly the water supply is much more predictable than the water from the monsoon season, which is the other key source of fresh water during the year. &lt;br&gt;
&lt;a href="http://lamages.blogspot.com/2013/02/review-kolner-r-meeting-6-february-2013.html#more"&gt;Read more »&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rKuKM/~4/ctM8X20lN_U" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://lamages.blogspot.com/feeds/3004350548141620636/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://lamages.blogspot.com/2013/02/review-kolner-r-meeting-6-february-2013.html#comment-form" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/3004350548141620636?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/3004350548141620636?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rKuKM/~3/ctM8X20lN_U/review-kolner-r-meeting-6-february-2013.html" title="Review: Kölner R Meeting 6 February 2013" /><author><name>Markus Gesmann</name><uri>https://plus.google.com/118201313972528070577</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-JwhCKZmguQs/AAAAAAAAAAI/AAAAAAAAASU/xOmDaEwnlbg/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-Vmu0HiE1eU0/URlV8qwT1FI/AAAAAAAAAxs/iIKG7LzCxVE/s72-c/img17.png" height="72" width="72" /><thr:total>4</thr:total><feedburner:origLink>http://lamages.blogspot.com/2013/02/review-kolner-r-meeting-6-february-2013.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUIDSHw8eip7ImA9WhBWEkk.&quot;"><id>tag:blogger.com,1999:blog-9065396442320388284.post-6491435266486977286</id><published>2013-02-05T07:08:00.000Z</published><updated>2013-04-06T11:19:39.272+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-04-06T11:19:39.272+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="News" /><category scheme="http://www.blogger.com/atom/ns#" term="Kölner R Users" /><category scheme="http://www.blogger.com/atom/ns#" term="Soapbox" /><category scheme="http://www.blogger.com/atom/ns#" term="KölnR" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><title>Next Kölner R User Meeting: 6 February 2013</title><content type="html">&lt;p&gt;Quick reminder: The next Cologne R user group meeting is scheduled for tomorrow, 6 February 2013. All details and the agenda are available on the &lt;a href="http://www.meetup.com/KoelnRUG/"&gt;KölnRUG Meetup site&lt;/a&gt;. Please sign up if you would like to come along. Notes from the last Cologne R user group meeting are available &lt;a href="http://lamages.blogspot.co.uk/2012/10/review-kolner-r-meeting-5-october-2012.html"&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://files.meetup.com/3576292/KoelnR_Aushang_6_Februar_2013.pdf" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="400" width="283" src="http://1.bp.blogspot.com/-9ZGMEL67gQo/UQQLVGXW5oI/AAAAAAAAAxM/XBo-wEx92BE/s400/KoelnR_Aushang_6_Februar_2013.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;Thanks also to &lt;a href="http://www.revolutionanalytics.com"&gt;Revolution Analytics&lt;/a&gt;, who are sponsoring the Cologne R user group as part of their &lt;a href="http://www.revolutionanalytics.com/news-events/r-user-group/"&gt;vector programme&lt;/a&gt;.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;div align="center"&gt;&lt;iframe width="550" height="250" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.co.uk/maps?f=q&amp;amp;source=s_q&amp;amp;hl=en&amp;amp;geocode=&amp;amp;q=Greinstra%C3%9Fe,+K%C3%B6ln,+Deutschland&amp;amp;aq=1&amp;amp;oq=greinstr&amp;amp;sll=53.800651,-4.064941&amp;amp;sspn=21.718578,41.967773&amp;amp;t=m&amp;amp;ie=UTF8&amp;amp;hq=&amp;amp;hnear=Greinstra%C3%9Fe,+S%C3%BClz+50939+K%C3%B6ln,+Nordrhein-Westfalen,+Germany&amp;amp;ll=50.924138,6.936922&amp;amp;spn=0.013526,0.047121&amp;amp;z=14&amp;amp;output=embed"&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;small&gt;&lt;a href="http://maps.google.co.uk/maps?f=q&amp;amp;source=embed&amp;amp;hl=en&amp;amp;geocode=&amp;amp;q=Greinstra%C3%9Fe,+K%C3%B6ln,+Deutschland&amp;amp;aq=1&amp;amp;oq=greinstr&amp;amp;sll=53.800651,-4.064941&amp;amp;sspn=21.718578,41.967773&amp;amp;t=m&amp;amp;ie=UTF8&amp;amp;hq=&amp;amp;hnear=Greinstra%C3%9Fe,+S%C3%BClz+50939+K%C3%B6ln,+Nordrhein-Westfalen,+Germany&amp;amp;ll=50.924138,6.936922&amp;amp;spn=0.013526,0.047121&amp;amp;z=14" style="color:#0000FF;text-align:left"&gt;View Larger Map&lt;/a&gt;&lt;/small&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rKuKM/~4/s5QrIYgVW-Q" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://lamages.blogspot.com/feeds/6491435266486977286/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://lamages.blogspot.com/2013/02/next-kolner-r-user-meeting-6-february.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/6491435266486977286?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/6491435266486977286?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rKuKM/~3/s5QrIYgVW-Q/next-kolner-r-user-meeting-6-february.html" title="Next Kölner R User Meeting: 6 February 2013" /><author><name>Markus Gesmann</name><uri>https://plus.google.com/118201313972528070577</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-JwhCKZmguQs/AAAAAAAAAAI/AAAAAAAAASU/xOmDaEwnlbg/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-9ZGMEL67gQo/UQQLVGXW5oI/AAAAAAAAAxM/XBo-wEx92BE/s72-c/KoelnR_Aushang_6_Februar_2013.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://lamages.blogspot.com/2013/02/next-kolner-r-user-meeting-6-february.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUcGRHg8fCp7ImA9WhNaFEk.&quot;"><id>tag:blogger.com,1999:blog-9065396442320388284.post-3179365929043184179</id><published>2013-01-29T08:10:00.000Z</published><updated>2013-01-29T08:10:25.674Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-01-29T08:10:25.674Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="stock market" /><category scheme="http://www.blogger.com/atom/ns#" term="random walk" /><category scheme="http://www.blogger.com/atom/ns#" term="Soapbox" /><category scheme="http://www.blogger.com/atom/ns#" term="ants" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><title>Follow the ants to richness</title><content type="html">A friend of mine told me the secret of making money at the stock market. &amp;quot;It&amp;#39;s easy&amp;quot;,  he said.&lt;br&gt;
&lt;br&gt;
All I would have to do is to buy a big jar of ants. Then I should observe the ants movement on my kitchen table, while following the stock market. &lt;br&gt;
&lt;br&gt;
I shall keep the ants which walk in line with the stock market and remove those who don&amp;#39;t. Eventually I would have one ant left that walked all the way in line with the stock market. &lt;br&gt;
&lt;br&gt;
Bingo! This is the one I have to keep feeding well and observe, as it clearly can predict the movements of the stock market. &lt;br&gt;
&lt;br&gt;
For more complex problems I recommend to use animals with bigger brains.&lt;br&gt;
&lt;br&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-TevXxaKBF5U/UP8iaUJU5kI/AAAAAAAAAwM/h8mWvGubzvA/s1600/Rplot.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="336" width="400" src="http://3.bp.blogspot.com/-TevXxaKBF5U/UP8iaUJU5kI/AAAAAAAAAwM/h8mWvGubzvA/s400/Rplot.png"&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://lamages.blogspot.com/2013/01/follow-ants-to-richness.html#more"&gt;Read more »&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rKuKM/~4/NG5E08Hns4M" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://lamages.blogspot.com/feeds/3179365929043184179/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://lamages.blogspot.com/2013/01/follow-ants-to-richness.html#comment-form" title="10 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/3179365929043184179?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/3179365929043184179?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rKuKM/~3/NG5E08Hns4M/follow-ants-to-richness.html" title="Follow the ants to richness" /><author><name>Markus Gesmann</name><uri>https://plus.google.com/118201313972528070577</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-JwhCKZmguQs/AAAAAAAAAAI/AAAAAAAAASU/xOmDaEwnlbg/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-TevXxaKBF5U/UP8iaUJU5kI/AAAAAAAAAwM/h8mWvGubzvA/s72-c/Rplot.png" height="72" width="72" /><thr:total>10</thr:total><feedburner:origLink>http://lamages.blogspot.com/2013/01/follow-ants-to-richness.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE8DRnY7fSp7ImA9WhNaFEk.&quot;"><id>tag:blogger.com,1999:blog-9065396442320388284.post-7914238002952542059</id><published>2013-01-22T23:18:00.000Z</published><updated>2013-01-29T08:07:57.805Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-01-29T08:07:57.805Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Insurance" /><category scheme="http://www.blogger.com/atom/ns#" term="Barnett Zehnwirth" /><category scheme="http://www.blogger.com/atom/ns#" term="Actuarial" /><category scheme="http://www.blogger.com/atom/ns#" term="reserving" /><category scheme="http://www.blogger.com/atom/ns#" term="Tutorials" /><category scheme="http://www.blogger.com/atom/ns#" term="log-incremental" /><category scheme="http://www.blogger.com/atom/ns#" term="ChainLadder" /><category scheme="http://www.blogger.com/atom/ns#" term="Risk" /><category scheme="http://www.blogger.com/atom/ns#" term="linear model" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><category scheme="http://www.blogger.com/atom/ns#" term="IBNR" /><title>Reserving based on log-incremental payments in R, part III</title><content type="html">This is the third post about Christofides&amp;#39; paper on &lt;i&gt;&lt;b&gt;Regression models based on log-incremental payments&lt;/b&gt;&lt;/i&gt; &lt;a href="#christofides"&gt;[1]&lt;/a&gt;. The &lt;a href="http://lamages.blogspot.co.uk/2013/01/reserving-based-on-log-incremental.html"&gt;first post&lt;/a&gt; covered the fundamentals of Christofides&amp;#39; reserving model in sections A - F, the &lt;a href="http://lamages.blogspot.co.uk/2013/01/reserving-based-on-log-incremental_15.html"&gt;second&lt;/a&gt; focused on a more realistic example and model reduction of sections G - K. Today&amp;#39;s post will wrap up the paper with sections L - M and discuss data normalisation and claims inflation. &lt;br&gt;
&lt;br&gt;
I will use the same triangle of incremental claims data as introduced in my &lt;a href="http://lamages.blogspot.co.uk/2013/01/reserving-based-on-log-incremental_15.html"&gt;previous post&lt;/a&gt;. The final model had three parameters for origin periods and two parameters for development periods. It is possible to reduce the model further as Christofides illustrates in section L onwards by using an inflation index to bring all claims payments to current value  and a claims volume adjustment or weight for each origin period to normalise the triangle.&lt;br&gt;
&lt;br&gt;
In his example Christofides uses claims volume adjustments for the origin years and an earning or inflation index for the different payment calendar years. The claims volume adjustments aims to normalise the triangle for similar exposures across origin periods, while the &lt;a href="http://www.measuringworth.com/ukearncpi/"&gt;earnings index, which measures largely wages and other forms of compensations&lt;/a&gt;, is used as a first proxy for claims inflation. Note that the earnings index shows significant year on year changes from 5% to 9%. Barnett and Zehnwirth &lt;a href="#barnett"&gt;[2]&lt;/a&gt; would probably recommend to add further parameters for the calendar year effects to the model.&lt;pre&gt;&lt;code&gt;# Page D5.36
ClaimsVolume &amp;lt;- data.frame(origin=0:6, 
  volume.index=c(1.43, 1.45, 1.52, 1.35, 1.29, 1.47, 1.91))
# Page D5.36
EarningIndex &amp;lt;- data.frame(cal=0:6, 
  earning.index=c(1.55, 1.41, 1.3, 1.23, 1.13, 1.05, 1))
# Year on year changes
round((1-EarningIndex$earning.index[-1]/EarningIndex$earning.index[-7]),2)
# [1] 0.09 0.08 0.05 0.08 0.07 0.05

dat &amp;lt;- merge(merge(dat, ClaimsVolume), EarningIndex)

# Normalise data for volume and earnings
dat$logvalue.ind.inf &amp;lt;- with(dat, log(value/volume.index*earning.index))
&lt;/code&gt;&lt;/pre&gt;

&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-mI7VZswZY5Y/UP3HNCnxB6I/AAAAAAAAAvs/2DclL2hIARM/s1600/Rplot.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="357" width="400" src="http://1.bp.blogspot.com/-mI7VZswZY5Y/UP3HNCnxB6I/AAAAAAAAAvs/2DclL2hIARM/s400/Rplot.png"&gt;&lt;/a&gt;&lt;/div&gt;&lt;pre&gt;&lt;code&gt;with(dat, interaction.plot(dev, origin, logvalue.ind.inf))
points(1+dat$dev, dat$logvalue.ind.inf, pch=16, cex=0.8)
&lt;/code&gt;&lt;/pre&gt;Indeed, the interaction plot shows the various origin years now to be much more closely grouped. Only the single point of the last origin period stands out now.

Christofides tests several models with different numbers of origin levels, but I am happy with the minimal model using only one parameter for the origin period, namely the intercept:&lt;a href="http://lamages.blogspot.com/2013/01/reserving-based-on-log-incremental_22.html#more"&gt;Read more »&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rKuKM/~4/7vkYu7rtdH8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://lamages.blogspot.com/feeds/7914238002952542059/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://lamages.blogspot.com/2013/01/reserving-based-on-log-incremental_22.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/7914238002952542059?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/7914238002952542059?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rKuKM/~3/7vkYu7rtdH8/reserving-based-on-log-incremental_22.html" title="Reserving based on log-incremental payments in R, part III" /><author><name>Markus Gesmann</name><uri>https://plus.google.com/118201313972528070577</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-JwhCKZmguQs/AAAAAAAAAAI/AAAAAAAAASU/xOmDaEwnlbg/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-mI7VZswZY5Y/UP3HNCnxB6I/AAAAAAAAAvs/2DclL2hIARM/s72-c/Rplot.png" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://lamages.blogspot.com/2013/01/reserving-based-on-log-incremental_22.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU4FRHw-eSp7ImA9WhNbGU8.&quot;"><id>tag:blogger.com,1999:blog-9065396442320388284.post-2227901162825562948</id><published>2013-01-15T07:46:00.000Z</published><updated>2013-01-23T06:51:55.251Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-01-23T06:51:55.251Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Insurance" /><category scheme="http://www.blogger.com/atom/ns#" term="Barnett Zehnwirth" /><category scheme="http://www.blogger.com/atom/ns#" term="Actuarial" /><category scheme="http://www.blogger.com/atom/ns#" term="reserving" /><category scheme="http://www.blogger.com/atom/ns#" term="Tutorials" /><category scheme="http://www.blogger.com/atom/ns#" term="log-incremental" /><category scheme="http://www.blogger.com/atom/ns#" term="ChainLadder" /><category scheme="http://www.blogger.com/atom/ns#" term="Risk" /><category scheme="http://www.blogger.com/atom/ns#" term="linear model" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><category scheme="http://www.blogger.com/atom/ns#" term="IBNR" /><title>Reserving based on log-incremental payments in R, part II</title><content type="html">&lt;script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"&gt;&lt;/script&gt;Following on from last &lt;a href="http://lamages.blogspot.co.uk/2013/01/reserving-based-on-log-incremental.html"&gt;week&amp;#39;s post&lt;/a&gt; I will continue to go through the paper &lt;i&gt;&lt;b&gt;Regression models based on log-incremental payments&lt;/b&gt;&lt;/i&gt; by Stavros Christofides &lt;a href="#christofides"&gt;[1]&lt;/a&gt;. In the &lt;a href="http://lamages.blogspot.co.uk/2013/01/reserving-based-on-log-incremental.html"&gt;previous post&lt;/a&gt; I introduced the model from the first 15 pages up to section F. Today I will progress with sections G to K which illustrate the model with a more realistic incremental claims payments triangle from a UK Motor Non-Comprehensive account:&lt;pre&gt;&lt;code&gt;# Page D5.17
tri &amp;lt;- t(matrix(
  c(3511, 3215, 2266, 1712, 1059, 587, 340,
    4001, 3702, 2278, 1180,  956, 629,  NA,
    4355, 3932, 1946, 1522, 1238,  NA,  NA,
    4295, 3455, 2023, 1320,   NA,  NA,  NA,
    4150, 3747, 2320,   NA,   NA,  NA,  NA,
    5102, 4548,   NA,   NA,   NA,  NA,  NA,
    6283,   NA,   NA,   NA,   NA,  NA,  NA), nc=7))
&lt;/code&gt;&lt;/pre&gt;The rows show origin period data, e.g. accident years, underwriting years or years of account and the columns present the development periods or lags. The triangle appears to be fairly well behaved. The last two years in rows 6 and 7 appear to be slightly higher than rows 2 to 5 and the values in row 1 are lower in comparison to the later years. The last payment of £1,238 in the third row stands out a bit as well. &lt;br&gt;
&lt;br&gt;
Before I plot the data, I will transform the triangle into a data frame and add extra columns:&lt;pre&gt;&lt;code&gt;m &amp;lt;- dim(tri)[1]; n &amp;lt;- dim(tri)[2]
dat &amp;lt;- data.frame(
  origin=rep(0:(m-1), n),
  dev=rep(0:(n-1), each=m),
  value=as.vector(tri))

## Add dimensions as factors
dat &amp;lt;- with(dat, data.frame(origin, dev, cal=origin+dev, 
                            value, logvalue=log(value),
                            originf=factor(origin),
                            devf=as.factor(dev),
                            calf=as.factor(origin+dev)))
&lt;/code&gt;&lt;/pre&gt;I am particularly interested in the decay of claims payments in the development year direction for each origin year on the original and log-scale. The &lt;code&gt;interaction.plot&lt;/code&gt; of the &lt;code&gt;stats&lt;/code&gt; package does an excellent job for this:&lt;pre&gt;&lt;code&gt;op &amp;lt;- par(mfrow=c(2,1), mar=c(4,4,2,2))
with(dat, interaction.plot(x.factor=dev, trace.factor=origin, 
          response=value))
points(dat$devf, dat$value, pch=16, cex=0.5)
with(dat, interaction.plot(x.factor=dev, trace.factor=origin, 
          response=logvalue))
points(dat$devf, dat$logvalue, pch=16, cex=0.5)
par(op)
&lt;/code&gt;&lt;/pre&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-5C1Q2WFihf0/UPRfkNVFjJI/AAAAAAAAAuQ/63vwyIcoxXw/s1600/Rplot.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="338" width="400" src="http://4.bp.blogspot.com/-5C1Q2WFihf0/UPRfkNVFjJI/AAAAAAAAAuQ/63vwyIcoxXw/s400/Rplot.png"&gt;&lt;/a&gt;&lt;/div&gt;Indeed the origin years 1 to 4 (rows 2 to 5) look quite similar and the decay of claims in development year direction appears to be linear on a log-scale from development year 1 onwards.&lt;br&gt;
&lt;br&gt;
Based on those observations Christofides suggests two models; the first one will have a unique level for each origin year and a unique level for the zero development period. The parameters for development periods 1 to 6 are assumed to follow a linear relationship with the same slope \(s\): &lt;br&gt;
\begin{align}&lt;br&gt;
\ln(P_{ij}) &amp;amp; = Y_{ij} = a_i + d_j + \epsilon_{ij} &lt;br&gt;
&amp;amp;\mbox{for } i,\,j \mbox{ from } 0 \mbox{ to } 6\\&lt;br&gt;
\mbox{where } d_0 &amp;amp;= d,\quad d_j = s \cdot j &lt;br&gt;
&amp;amp;\mbox{for } j &amp;gt; 0&lt;br&gt;
\end{align}and \(\epsilon_{ij} \sim N(0, \sigma^2)\). The second model will be a reduced version of the above with only two levels for the origin years 5 and 6. Hence, I add four more columns to my data frame:&lt;a href="http://lamages.blogspot.com/2013/01/reserving-based-on-log-incremental_15.html#more"&gt;Read more »&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rKuKM/~4/X8ft8pt_C1s" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://lamages.blogspot.com/feeds/2227901162825562948/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://lamages.blogspot.com/2013/01/reserving-based-on-log-incremental_15.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/2227901162825562948?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/2227901162825562948?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rKuKM/~3/X8ft8pt_C1s/reserving-based-on-log-incremental_15.html" title="Reserving based on log-incremental payments in R, part II" /><author><name>Markus Gesmann</name><uri>https://plus.google.com/118201313972528070577</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-JwhCKZmguQs/AAAAAAAAAAI/AAAAAAAAASU/xOmDaEwnlbg/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-5C1Q2WFihf0/UPRfkNVFjJI/AAAAAAAAAuQ/63vwyIcoxXw/s72-c/Rplot.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://lamages.blogspot.com/2013/01/reserving-based-on-log-incremental_15.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEEERng9eCp7ImA9WhBVF0U.&quot;"><id>tag:blogger.com,1999:blog-9065396442320388284.post-2761986090749121896</id><published>2013-01-08T07:58:00.000Z</published><updated>2013-04-24T07:56:47.660+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-04-24T07:56:47.660+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Insurance" /><category scheme="http://www.blogger.com/atom/ns#" term="Barnett Zehnwirth" /><category scheme="http://www.blogger.com/atom/ns#" term="Actuarial" /><category scheme="http://www.blogger.com/atom/ns#" term="reserving" /><category scheme="http://www.blogger.com/atom/ns#" term="Tutorials" /><category scheme="http://www.blogger.com/atom/ns#" term="log-incremental" /><category scheme="http://www.blogger.com/atom/ns#" term="ChainLadder" /><category scheme="http://www.blogger.com/atom/ns#" term="Risk" /><category scheme="http://www.blogger.com/atom/ns#" term="linear model" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><category scheme="http://www.blogger.com/atom/ns#" term="IBNR" /><title>Reserving based on log-incremental payments in R, part I</title><content type="html">&lt;script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"&gt;&lt;/script&gt;A recent &lt;a href="http://pirategrunt.wordpress.com/2013/01/02/you-cant-spell-loss-reserving-without-r/"&gt;post on the PirateGrunt blog on claims reserving&lt;/a&gt; inspired me to look into the paper &lt;strong&gt;&lt;i&gt;Regression models based on log-incremental payments&lt;/i&gt;&lt;/strong&gt; by Stavros Christofides &lt;a href="#christofides"&gt;[1]&lt;/a&gt;, published as part of the &lt;a href="http://www.actuaries.org.uk/research-and-resources/pages/claims-reserving-manual"&gt;&lt;i&gt;Claims Reserving Manual (Version 2)&lt;/i&gt;&lt;/a&gt; of the Institute of Actuaries.&lt;br&gt;
&lt;br&gt;
The paper is available together with a &lt;a href="http://www.actuaries.org.uk/research-and-resources/documents/claims-reserving-manual-vol2-section-d5-regression-models-based-log"&gt;spread sheet model&lt;/a&gt;, illustrating the calculations. It is very much based on ideas by Barnett and Zehnwirth, see &lt;a href="#Barnett"&gt;[2]&lt;/a&gt; for a reference. However, doing statistical analysis in a spread sheet programme is often cumbersome. I will go through the first 15 pages of Christofides&amp;#39; paper today and illustrate how the model can be implemented in &lt;a href="http://www.r-project.org"&gt;R&lt;/a&gt;.  &lt;br&gt;
&lt;br&gt;
Let&amp;#39;s start with the example data of an incremental claims triangle:&lt;br&gt;
&lt;pre&gt;&lt;code&gt;## Page D5.4
tri &amp;lt;- t(matrix(
  c(11073,  6427, 1839, 766,
    14799,  9357, 2344,  NA,
    15636, 10523,   NA,  NA,
    16913,    NA,   NA,  NA), 
  nc=4, dimnames=list(origin=0:3, dev=0:3)))
&lt;/code&gt;&lt;/pre&gt;The above triangle shows incremental claims payments for four origin (accident) years over time (development years). It is the aim to predict the bottom right triangle of future claims payments, assuming no further claims after four development years.&lt;br&gt;
&lt;br&gt;
Christofides model assumes the following structure for the incremental paid claims \(P_{ij}\):&lt;br&gt;
\begin{align}&lt;br&gt;
\ln(P_{ij}) &amp;amp; = Y_{ij} = a_i + b_j + \epsilon_{ij}&lt;br&gt;
\end{align}where i and j go from 0 to 3, \(b_0=0\) and \(\epsilon_{ij} \sim N(0, \sigma^2)\). Unlike the basic chain-ladder method, this is a stochastic model that allows me to test my assumptions and calculate various statistics, e.g. standards errors of my predictions.&lt;br&gt;
&lt;a href="http://lamages.blogspot.com/2013/01/reserving-based-on-log-incremental.html#more"&gt;Read more »&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rKuKM/~4/WmWhXJ4Tt-A" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://lamages.blogspot.com/feeds/2761986090749121896/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://lamages.blogspot.com/2013/01/reserving-based-on-log-incremental.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/2761986090749121896?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/2761986090749121896?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rKuKM/~3/WmWhXJ4Tt-A/reserving-based-on-log-incremental.html" title="Reserving based on log-incremental payments in R, part I" /><author><name>Markus Gesmann</name><uri>https://plus.google.com/118201313972528070577</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-JwhCKZmguQs/AAAAAAAAAAI/AAAAAAAAASU/xOmDaEwnlbg/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-nDDgTiTJ_hc/UOgWJvYsbKI/AAAAAAAAAtk/VWFDvqqBfi8/s72-c/Rplot01.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://lamages.blogspot.com/2013/01/reserving-based-on-log-incremental.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkQAQXc4cCp7ImA9WhNUEUw.&quot;"><id>tag:blogger.com,1999:blog-9065396442320388284.post-3622178772971383162</id><published>2013-01-02T08:12:00.000Z</published><updated>2013-01-02T08:12:20.938Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-01-02T08:12:20.938Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="github" /><category scheme="http://www.blogger.com/atom/ns#" term="gists" /><category scheme="http://www.blogger.com/atom/ns#" term="RJSONIO" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><title>Clone all your gists locally with R</title><content type="html">I really like &lt;a href="https://gist.github.com"&gt;gists&lt;/a&gt; as a quick way to include more lengthly code snippets into my blog posts. However, I am not a git user as such, and so I was quite concerned when I noticed that all my gists on this &lt;a href="http://lamages.blogspot.com"&gt;blog&lt;/a&gt; had vanished after Christmas. I suppose this was a result of Github&amp;#39;s &lt;a href="https://github.com/blog/1364-downtime-last-saturday"&gt;downtime on December 22nd&lt;/a&gt;.&lt;br&gt;
&lt;br&gt;
Thankfully an email to the support guys at Github resolved the issue within a few hours. Still, I thought it might be a good idea to download my gists locally.&lt;br&gt;
&lt;br&gt;
I can see all my gists as a JSON file online here: &lt;code&gt;https://api.github.com/users/MYUSERLOGIN/gists&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
Thus, I downloaded the file and thanks to the &lt;a href="http://cran.r-project.org/web/packages/RJSONIO/index.html"&gt;RJSONIO&lt;/a&gt; package I was able to clone all my gists locally with a few lines of R:&lt;br&gt;
&lt;a href="http://lamages.blogspot.com/2013/01/clone-all-your-gists-locally-with-r.html#more"&gt;Read more »&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rKuKM/~4/2siAd6LsVUs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://lamages.blogspot.com/feeds/3622178772971383162/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://lamages.blogspot.com/2013/01/clone-all-your-gists-locally-with-r.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/3622178772971383162?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/3622178772971383162?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rKuKM/~3/2siAd6LsVUs/clone-all-your-gists-locally-with-r.html" title="Clone all your gists locally with R" /><author><name>Markus Gesmann</name><uri>https://plus.google.com/118201313972528070577</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-JwhCKZmguQs/AAAAAAAAAAI/AAAAAAAAASU/xOmDaEwnlbg/s512-c/photo.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://lamages.blogspot.com/2013/01/clone-all-your-gists-locally-with-r.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkIMRH45cCp7ImA9WhBTEU0.&quot;"><id>tag:blogger.com,1999:blog-9065396442320388284.post-4790494906178994161</id><published>2012-12-19T06:42:00.000Z</published><updated>2013-02-05T21:43:05.028Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-05T21:43:05.028Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Insurance" /><category scheme="http://www.blogger.com/atom/ns#" term="Cass Business School" /><category scheme="http://www.blogger.com/atom/ns#" term="R in Insurance" /><category scheme="http://www.blogger.com/atom/ns#" term="Conference" /><category scheme="http://www.blogger.com/atom/ns#" term="2013" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><title>R in Insurance Conference, London, 15 July 2013</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://dl.dropbox.com/u/7586336/blogger/London.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="170" src="https://dl.dropbox.com/u/7586336/blogger/London.jpg" width="600" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
The first conference on &lt;i&gt;&lt;strong&gt;R in Insurance&lt;/strong&gt;&lt;/i&gt; will be held on Monday 15 July 2013 at &lt;a href="http://www.cass.city.ac.uk/news-and-events/conferences/r-in-insurance"&gt;Cass Business School&lt;/a&gt; in London, UK. &lt;br /&gt;
&lt;br /&gt;
The intended audience of the conference includes both academics and practitioners who are active or interested in the applications of R in insurance.&lt;br /&gt;
&lt;br /&gt;
This one-day conference will focus on applications in insurance and actuarial science that use R, the lingua franca for statistical computation. Topics covered may include actuarial statistics, capital modelling, pricing, reserving, reinsurance and extreme events, portfolio allocation, advanced risk tools, high-performance computing, econometrics and more. All topics will be discussed within the context of using R as a primary tool for insurance risk management, analysis and modelling.&lt;br /&gt;
&lt;br /&gt;
The intended audience of the conference includes both academics and practitioners who are active or interested in the applications of R in insurance. &lt;br /&gt;
&lt;br /&gt;
The 2013 &lt;i&gt;&lt;strong&gt;R in Insurance&lt;/strong&gt;&lt;/i&gt; conference builds upon the success of the &lt;i&gt;&lt;a href="http://www.rinfinance.com/"&gt;R in Finance&lt;/a&gt;&lt;/i&gt; and &lt;i&gt;&lt;a href="https://www.rmetrics.org/"&gt;R/Rmetrics&lt;/a&gt;&lt;/i&gt; events. We expect invited keynote lectures by:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.ma.hw.ac.uk/~mcneil/"&gt;Professor Alexander McNeil&lt;/a&gt;, Department of Actuarial Science &amp; Statistics&lt;br /&gt;
Heriot-Watt University&lt;/li&gt;
&lt;li&gt; &lt;a href="http://www.lloyds.com/news-and-insight/lloyds-blog/our-experts/trevor-maynard"&gt;Trevor Maynard&lt;/a&gt;, Head of Exposure Management and Reinsurance, Lloyd's&lt;/li&gt;
&lt;/ul&gt;We invite you to submit a one-page abstract for consideration. Both academic and practitioner proposals related to R are encouraged.&lt;br /&gt;
&lt;br /&gt;
Details about the registration and abstract submission are given on the &lt;a href="http://www.cass.city.ac.uk/news-and-events/conferences/r-in-insurance"&gt;&lt;i&gt;R in Insurance&lt;/i&gt; event web site of Cass Business School&lt;/a&gt;. &lt;br /&gt;
&lt;br /&gt;
You can contact us via &lt;a href="mailto:rinsuranceconference@gmail.com"&gt;rinsuranceconference at gmail dot com&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
The organisers, &lt;a href="http://www.cass.city.ac.uk/experts/a.tsanakas"&gt;Andreas Tsanakas&lt;/a&gt; and &lt;a href="http://lamages.blogspot.com/"&gt;Markus Gesmann&lt;/a&gt;, gratefully acknowledge the sponsorship of &lt;a href="http://www.mango-solutions.com/"&gt;&lt;strong&gt;Mango Solutions&lt;/strong&gt;&lt;/a&gt;.&lt;img src="http://feeds.feedburner.com/~r/blogspot/rKuKM/~4/2dhK5CMCLlU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://lamages.blogspot.com/feeds/4790494906178994161/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://lamages.blogspot.com/2012/12/r-in-insurance-conference-london-15.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/4790494906178994161?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/4790494906178994161?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rKuKM/~3/2dhK5CMCLlU/r-in-insurance-conference-london-15.html" title="R in Insurance Conference, London, 15 July 2013" /><author><name>Markus Gesmann</name><uri>https://plus.google.com/118201313972528070577</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-JwhCKZmguQs/AAAAAAAAAAI/AAAAAAAAASU/xOmDaEwnlbg/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://lamages.blogspot.com/2012/12/r-in-insurance-conference-london-15.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk8FR3cyfSp7ImA9WhNbFko.&quot;"><id>tag:blogger.com,1999:blog-9065396442320388284.post-9173475731497088357</id><published>2012-12-17T07:55:00.000Z</published><updated>2013-01-20T09:40:16.995Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-01-20T09:40:16.995Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Lloyd's" /><category scheme="http://www.blogger.com/atom/ns#" term="voronoi" /><category scheme="http://www.blogger.com/atom/ns#" term="cluster analysis" /><category scheme="http://www.blogger.com/atom/ns#" term="k-means" /><category scheme="http://www.blogger.com/atom/ns#" term="image manipulation" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><title>Now I see it! K-means cluster analysis in R</title><content type="html">Of course, a picture on a computer monitor is a coloured plot of x and y coordinates or pixels. Still, I was smitten by &lt;a href="http://dsparks.wordpress.com"&gt;David Sparks&amp;#39;&lt;/a&gt; posts on &lt;a href="http://is-r.tumblr.com"&gt;is.r()&lt;/a&gt;, where he shows how easy it is to read images into R to analyse them. In two posts &lt;a href="http://is-r.tumblr.com/post/36660147376/dominant-color-palettes-with-k-means"&gt;[1]&lt;/a&gt;, &lt;a href="http://is-r.tumblr.com/post/36732821806/images-as-voronoi-tesselations"&gt;[2]&lt;/a&gt; he replicates functionality of image manipulation programmes like &lt;a href="http://www.gimp.org/"&gt;GIMP&lt;/a&gt;.&lt;br&gt;
&lt;br&gt;
I can&amp;#39;t resist to write about this here as well. David&amp;#39;s first post is about &lt;a href="http://en.wikipedia.org/wiki/K-means_clustering"&gt;k-means cluster analysis&lt;/a&gt;. One of the popular algorithms for k-means is &lt;a href="Lloyd&amp;#39;s_algorithm"&gt;Lloyd&amp;#39;s algorithm&lt;/a&gt;. So, on that note I will use a picture of the Lloyd&amp;#39;s of London building to play around with David&amp;#39;s code, despite the fact that the two Lloyds have nothing to do with each other. Lloyd&amp;#39;s provides pictures of its building copyright free on its &lt;a href="http://www.lloyds.com/lloyds/about-us/the-lloyds-building/images-of-the-lloyds-building/exterior-images"&gt;web site&lt;/a&gt;. However, I will use a reduced file size version hosted on &lt;a href="http://upload.wikimedia.org/wikipedia/commons/6/6a/6414A_1_copy.jpg"&gt;wikimedia&lt;/a&gt;.&lt;br&gt;
&lt;br&gt;
The &lt;a href="http://cran.r-project.org/web/packages/ReadImages/index.html"&gt;ReadImages&lt;/a&gt; package by Markus Löcher &lt;a href="#ReadImages"&gt;[3]&lt;/a&gt; allows me to load a jpeg-file into R. The R object of the images is an array, which has the structure of three layered matrices, representing the value of the colours red, green and blue for each x and y coordinate. I convert the array into a data frame, as this is an accepted  structure by k-means and plot the data.   &lt;br&gt;
&lt;core&gt;&lt;pre&gt;library(&amp;quot;ReadImages&amp;quot;)
url &amp;lt;- &amp;quot;http://upload.wikimedia.org/wikipedia/commons/6/6a/6414A_1_copy.jpg&amp;quot;
fn &amp;lt;- tempfile()
download.file(url, destfile=fn)
readImage &amp;lt;- read.jpeg(fn)

dm &amp;lt;- dim(readImage)
rgbImage &amp;lt;- data.frame(
                    x=rep(1:dm[2], each=dm[1]),
                    y=rep(dm[1]:1, dm[2]),
                    r.value=as.vector(readImage[,,1]),
                    g.value=as.vector(readImage[,,2]),
                    b.value=as.vector(readImage[,,3]))

plot(y ~ x, data=rgbImage, main=&amp;quot;Lloyd&amp;#39;s building&amp;quot;,
     col = rgb(rgbImage[c(&amp;quot;r.value&amp;quot;, &amp;quot;g.value&amp;quot;, &amp;quot;b.value&amp;quot;)]), 
     asp = 1, pch = &amp;quot;.&amp;quot;)&lt;/pre&gt;&lt;br&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-B5Jn3MnCrjI/UMpWSf-TzMI/AAAAAAAAArA/CQVEja8VCPs/s1600/Rplot.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="400" width="267" src="http://1.bp.blogspot.com/-B5Jn3MnCrjI/UMpWSf-TzMI/AAAAAAAAArA/CQVEja8VCPs/s400/Rplot.png"&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;
Running a k-means analysis on the three colour columns in my data frame allows me to reduce the picture to k colours. The output gives me for each x and y coordinate the colour cluster it belongs to. Thus, I plot my picture again, but replace the original colours with the cluster colours.&lt;/core&gt;&lt;a href="http://lamages.blogspot.com/2012/12/now-i-see-it-k-means-cluster-analysis.html#more"&gt;Read more »&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rKuKM/~4/gQ3ZZR3UEfs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://lamages.blogspot.com/feeds/9173475731497088357/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://lamages.blogspot.com/2012/12/now-i-see-it-k-means-cluster-analysis.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/9173475731497088357?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9065396442320388284/posts/default/9173475731497088357?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rKuKM/~3/gQ3ZZR3UEfs/now-i-see-it-k-means-cluster-analysis.html" title="Now I see it! K-means cluster analysis in R" /><author><name>Markus Gesmann</name><uri>https://plus.google.com/118201313972528070577</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-JwhCKZmguQs/AAAAAAAAAAI/AAAAAAAAASU/xOmDaEwnlbg/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-B5Jn3MnCrjI/UMpWSf-TzMI/AAAAAAAAArA/CQVEja8VCPs/s72-c/Rplot.png" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://lamages.blogspot.com/2012/12/now-i-see-it-k-means-cluster-analysis.html</feedburner:origLink></entry></feed>
