Multi State Models

Arc de Triomphe

A special issue of the Journal of Statistical Software has come out devoted to Multi State Models and Competing Risks. It is a must read for anyone with interest in Pharma Analytics or Survival Analysis- even if you dont know much R

Here is an extract from “mstate: An R Package for the Analysis ofCompeting Risks and Multi-State Models”

Multi-state models are a very useful tool to answer a wide range of questions in sur-vival analysis that cannot, or only in a more complicated way, be answered by classicalmodels. They are suitable for both biomedical and other applications in which time-to-event variables are analyzed. However, they are still not frequently applied. So far, animportant reason for this has been the lack of available software. To overcome this prob-lem, we have developed the mstate package in R for the analysis of multi-state models.The package covers all steps of the analysis of multi-state models, from model buildingand data preparation to estimation and graphical representation of the results. It canbe applied to non- and semi-parametric (Cox) models. The package is also suitable forcompeting risks models, as they are a special category of multi-state models.

 

—————————–

 

Issues for JSS Special Volume 38: Competing Risks and Multi-State Models

Special Issue about Competing Risks and Multi-State Models

Hein Putter
Vol. 38, Issue 1, Jan 2011
Submitted 2011-01-03, Accepted 2011-01-03

Analyzing Competing Risk Data Using the R timereg Package

Thomas H. Scheike, Mei-Jie Zhang
Vol. 38, Issue 2, Jan 2011
Submitted 2009-05-25, Accepted 2010-06-22

p3state.msm: Analyzing Survival Data from an Illness-Death Model

Luís Filipe Meira Machado, Javier Roca-Pardiñas
Vol. 38, Issue 3, Jan 2011
Submitted 2009-06-30, Accepted 2010-03-02

Empirical Transition Matrix of Multi-State Models: The etm Package

Arthur Allignol, Martin Schumacher, Jan Beyersmann
Vol. 38, Issue 4, Jan 2011
Submitted 2009-01-08, Accepted 2010-03-11

Lexis: An R Class for Epidemiological Studies with Long-Term Follow-Up

Martyn Plummer, Bendix Carstensen
Vol. 38, Issue 5, Jan 2011
Submitted 2010-02-09, Accepted 2010-09-16

Using Lexis Objects for Multi-State Models in R

Bendix Carstensen, Martyn Plummer
Vol. 38, Issue 6, Jan 2011
Submitted 2010-02-09, Accepted 2010-09-16

mstate: An R Package for the Analysis of Competing Risks and Multi-State Models

Liesbeth C. de Wreede, Marta Fiocco, Hein Putter
Vol. 38, Issue 7, Jan 2011
Submitted 2010-01-17, Accepted 2010-08-20

Multi-State Models for Panel Data: The msm Package for R

Christopher Jackson
Vol. 38, Issue 8, Jan 2011
Submitted 2009-07-21, Accepted 2010-08-18

_______________________________________________
JSS-Announce mailing list
JSS-Announce@lists.stat.ucla.edu
http://lists.stat.ucla.edu/mailman/listinfo/jss-announce

 

How to balance your online advertising and your offline conscience

Google in 1998, showing the original logo
Image via Wikipedia

I recently found an interesting example of  a website that both makes a lot of money and yet is much more efficient than any free or non profit. It is called ECOSIA

If you see a website that wants to balance administrative costs  plus have a transparent way to make the world better- this is a great example.

  • http://ecosia.org/how.php
  • HOW IT WORKS
    You search with Ecosia.
  • Perhaps you click on an interesting sponsored link.
  • The sponsoring company pays Bing or Yahoo for the click.
  • Bing or Yahoo gives the bigger chunk of that money to Ecosia.
  • Ecosia donates at least 80% of this income to support WWF’s work in the Amazon.
  • If you like what we’re doing, help us spread the word!
  • Key facts about the park:

    • World’s largest tropical forest reserve (38,867 square kilometers, or about the size of Switzerland)
    • Home to about 14% of all amphibian species and roughly 54% of all bird species in the Amazon – not to mention large populations of at least eight threatened species, including the jaguar
    • Includes part of the Guiana Shield containing 25% of world’s remaining tropical rainforests – 80 to 90% of which are still pristine
    • Holds the last major unpolluted water reserves in the Neotropics, containing approximately 20% of all of the Earth’s water
    • One of the last tropical regions on Earth vastly unaltered by humans
    • Significant contributor to climatic regulation via heat absorption and carbon storage

     

    http://ecosia.org/statistics.php

    They claim to have donated 141,529.42 EUR !!!

    http://static.ecosia.org/files/donations.pdf

     

     

     

     

     

     

     

     

     

     

    Well suppose you are the Web Admin of a very popular website like Wikipedia or etc

    One way to meet server costs is to say openly hey i need to balance my costs so i need some money.

    The other way is to use online advertising.

    I started mine with Google Adsense.

    Click per milli (or CPM)  gives you a very low low conversion compared to contacting ad sponsor directly.

    But its a great data experiment-

    as you can monitor which companies are likely to be advertised on your site (assume google knows more about their algols than you will)

    which formats -banner or text or flash have what kind of conversion rates

    what are the expected pay off rates from various keywords or companies (like business intelligence software, predictive analytics software and statistical computing software are similar but have different expected returns (if you remember your eco class)

     

    NOW- Based on above data, you know whats your minimum baseline to expect from a private advertiser than a public, crowd sourced search engine one (like Google or Bing)

    Lets say if you have 100000 views monthly. and assume one out of 1000 page views will lead to a click. Say the advertiser will pay you 1 $ for every 1 click (=1000 impressions)

    Then your expected revenue is $100.But if your clicks are priced at 2.5$ for every click , and your click through rate is now 3 out of 1000 impressions- (both very moderate increases that can done by basic placement optimization of ad type, graphics etc)-your new revenue is  750$.

    Be a good Samaritan- you decide to share some of this with your audience -like 4 Amazon books per month ( or I free Amazon book per week)- That gives you a cost of 200$, and leaves you with some 550$.

    Wait! it doesnt end there- Adam Smith‘s invisible hand moves on .

    You say hmm let me put 100 $ for an annual paper writing contest of $1000, donate $200 to one laptop per child ( or to Amazon rain forests or to Haiti etc etc etc), pay $100 to your upgraded server hosting, and put 350$ in online advertising. say $200 for search engines and $150 for Facebook.

    Woah!

    Month 1 would should see more people  visiting you for the first time. If you have a good return rate (returning visitors as a %, and low bounce rate (visits less than 5 secs)- your traffic should see atleast a 20% jump in new arrivals and 5-10 % in long term arrivals. Ignoring bounces- within  three months you will have one of the following

    1) An interesting case study on statistics on online and social media advertising, tangible motivations for increasing community response , and some good data for study

    2) hopefully better cost management of your server expenses

    3)very hopefully a positive cash flow

     

    you could even set a percentage and share the monthly (or annually is better actions) to your readers and advertisers.

    go ahead- change the world!

    the key paradigms here are sharing your traffic and revenue openly to everyone

    donating to a suitable cause

    helping increase awareness of the suitable cause

    basing fixed percentages rather than absolute numbers to ensure your site and cause are sustained for years.

    Book Reviews- Hindu Myths- Mere Christianity

    A statue of Hindu deity Shiva in a temple in B...
    Image via Wikipedia

    Over the month long break I took, I was helping firm up my ideas for R for Analytics , I also took a break and read some books. Here are brief reviews of two, three of them-

    1) Hindu Myths

    This is a classical book translated from original Sanskrit written by Professor Wendy O Flaherty of University of Chicago. I found some of the older myths very interesting in terms of contradictions, retelling the same story in a modified way by another classic, the beautiful poetic and fantastic imagery evoked by Hindu myths. Some stories are as relevant in prayers, fasts and religious ceremonies as they were around 11000 years while most have morphed , edited or even distorted.

    It should help the non Indian reader understand why hundreds of millions of conservative Indians worship Shiv Ling ( or literally an idol of the Phallus of Shiva), the Hindu two cents of creation of the universe, and the somewhat fantastic stories on super heroes /gods/ in the ancient world.

    The book suffers from a few drawbacks in my opinion-

    1) Sanskrit is a bit like Latin- you can lose not just the flavor but original meaning of words and situational context. Some of the stories made better sense when i read a more recent Hindi translation.

    2) An excessive emphasis on sexual imagery rather than emotional imagery. The author seems wonder struck to read and translate ancient indians were so matter of fact about physical relationships. However the words were always written in discrete poetic than crass soft pornography.

    3) Almost no drawings or figures. This makes the book a bit dense to read at 300 pages.

    I liked another book on Hindu Myths (Myth= Mithya which I read in 2009) and you can see if you can read it if you find the topic interesting.

    A Handbook of Hindu Mythology

    Hindus have one God.
    They also have 330 million gods: male gods, female gods, personal gods, family gods, household gods, village gods, gods of space and time, gods for specific castes and particular professions, gods who reside in trees, in animals, in minerals, in geometrical patterns and in man-made objects.
    Then there are a whole host of demons.
    But no Devil.


    Mere Christianity by C S Lewis is a classic book on reinterpreting Christianity in modern times. However the author wrote this when World War 2 was on and it seems more like a British or Anglo Saxon interpretation of beliefs of Christ Jesus– who was actually a Jewish teacher born in Middle East Asia.

    While the language and reading makes it much easier to read- it is recommended more at Western audiences, than Eastern ones, as it seems some of the parables are a more palatable re interpretation of the New Testament. The Bible is a deceptively easy book to read, the language is short and beautiful-and the original parables in the Gospels remain powerful easy to understand.

    C S Lewis tends to emphasize morality than religiosity or faith, and there is not much comparison with any other faith or alternative morality. Dumbing down the Bible so as to market it better to reluctant consumers seems to be Mr Lewis intention and it is not as scholarly a work as an exercise in pure prose.

    However it is quite good as a self improvement book and is quite better than the “You Can Win” kind of books or even business concept books.

    Note- I find reading books on religion as good exercises in reading the fountain source of philosophies. As a polytheist- I tend to read more than one faith.

    2010 in review and WP-Stats

    The following is an auto generated post thanks to WordPress.com stats team- clearly they have got some stuff wrong

    1) Defining the speedometer quantitatively

    2) The busiest day numbers are plain wrong ( 2 views ??)

    3) There is still no geographic data in WordPress -com stats (unlike Google Analytics) and I cant enable Google Analytics on a wordpress.com hosted site.

     

    The stats helper monkeys at WordPress.com mulled over how this blog did in 2010, and here’s a high level summary of its overall blog health:

    Healthy blog!

    The Blog-Health-o-Meter™ reads Wow.

    Crunchy numbers

    Featured image

    The Louvre Museum has 8.5 million visitors per year. This blog was viewed about 97,000 times in 2010. If it were an exhibit at The Louvre Museum, it would take 4 days for that many people to see it.

     

    In 2010, there were 367 new posts, growing the total archive of this blog to 1191 posts. There were 411 pictures uploaded, taking up a total of 121mb. That’s about 1 pictures per day.

    The busiest day of the year was September 22nd with 2 views. The most popular post that day was Top 10 Graphical User Interfaces in Statistical Software.

    Where did they come from?

    The top referring sites in 2010 were r-bloggers.com, reddit.com, rattle.togaware.com, twitter.com, and Google Reader.

    Some visitors came searching, mostly for libre office, facebook analytics, test drive a chrome notebook, test drive a chrome notebook., and wps sas lawsuit.

    Attractions in 2010

    These are the posts and pages that got the most views in 2010.

    1

    Top 10 Graphical User Interfaces in Statistical Software April 2010
    8 comments and 1 Like on WordPress.com,

    2

    Wealth = function (numeracy, memory recall) December 2009
    1 Like on WordPress.com,

    3

    Matlab-Mathematica-R and GPU Computing September 2010
    1 Like on WordPress.com,

    4

    About DecisionStats July 2008

    5

    The Top Statistical Softwares (GUI) May 2010
    1 comment and 1 Like on WordPress.com,

    A Dare for Analytics Bloggers in 2011

    A new challenge for R , SAS and all techie bloggers-

    http://en.blog.wordpress.com/2010/12/30/challenge-for-2011-want-to-blog-more-often/

    As part of the DailyPost, we’re launching two campaigns:

    • Post a Day 2011: Post something to your blog every single day through 2011
    • Post a Week 2011: Post to your blog at least once a week through 2011

    Signing up is simple – do the following:

    1. Post on your blog, right now, that you’re participating
    2. (You can grab a sample post from dailypost.wordpress.com)
    3. Use the tag postaday2011 or postaweek2011 in your posts (tips on tagging here)
    4. Go to dailypost.wordpress.com
    5. Subscribe to dailypost.wordpress.com– you’ll get reminders and inspirations every day to help you bring your full potential to your WordPress blog!

     

    Do you write a blog or own a website?

    Well how about taking up this challenge?

    Who Dares-    Wins

    Game On!!!

    R Journal Dec 2010 and R for Business Analytics

    A Bold GNU Head
    Image via Wikipedia

    I almost missed out on the R Journal for this month- great reading,

    and I liked Dr Hadley’s article on stringr package the best. Really really useful package and nice writing too

    http://journal.r-project.org/archive/2010-2/RJournal_2010-2_Wickham.pdf

    (incidentally I just downloaded a local copy of his ggplot website at http://had.co.nz/ggplot2/ggplot-static.zip

    I aim to really read that one up

    Okay, announcement time

    I just signed a contract with Springer for a book on R, some what in first half of 2011

    ” R for Business Analytics

    its going to be a more business analytics than a stats perspective ( I am a MBA /Mech Engineer)

    and use cases would be business analytics cases. Do write to me if you need help doing some analytics in R (business use cases)- or want something featured. Big focus would be on GUI and easier analytics, using the Einsteinian principle to make things as simple as possible but no simpler)

    The Year 2010

    Nokia N800 internet tablet, with open source s...
    Image via Wikipedia

    My annual traffic to this blog was almost 99,000 . Add in additional views on networking sites plus the 400 plus RSS readers- so I can say traffic was 1,20,000 for 2010. Nice. Thanks for reading and hope it was worth your time. (this is a long post and will take almost 440 secs to read but the summary is just given)

    My intent is either to inform you, give something useful or atleast something interesting.

    see below-

    Jan Feb Mar Apr May Jun
    2010 6,311 4,701 4,922 5,463 6,493 4,271
    Jul Aug Sep Oct Nov Dec Total
    5,041 5,403 17,913 16,430 11,723 10,096 98,767

     

     

    Sandro Saita from http://www.dataminingblog.com/ just named me for an award on his blog (but my surname is ohRi , Sandro left me without an R- What would I be without R :)) ).

    Aw! I am touched. Google for “Data Mining Blog” and Sandro is the best that it is in data mining writing.

    DMR People Award 2010
    There are a lot of active people in the field of data mining. You can discuss with them on forums. You can read their blogs. You can also meet them in events such as PAW or KDD. Among the people I follow on a regular basis, I have elected:

    Ajay Ori

    He has been very active in 2010, especially on his blog . Good work Ajay and continue sharing your experience with us!”

    What did I write in 2010- stuff.

    What did you read on this blog- well thats the top posts list.

    2009-12-31 to Today

    Title Views
    Home page More stats 21,150
    Top 10 Graphical User Interfaces in Statistical Software More stats 6,237
    Wealth = function (numeracy, memory recall) More stats 2,014
    Matlab-Mathematica-R and GPU Computing More stats 1,946
    The Top Statistical Softwares (GUI) More stats 1,405
    About DecisionStats More stats 1,352
    Using Facebook Analytics (Updated) More stats 1,313
    Test drive a Chrome notebook. More stats 1,170
    Top ten RRReasons R is bad for you ? More stats 1,157
    Libre Office More stats 1,151
    Interview Hadley Wickham R Project Data Visualization Guru More stats 1,007
    Using Red R- R with a Visual Interface More stats 854
    SAS Institute files first lawsuit against WPS- Episode 1 More stats 790
    Interview Professor John Fox Creator R Commander More stats 764
    R Package Creating More stats 754
    Windows Azure vs Amazon EC2 (and Google Storage) More stats 726
    Norman Nie: R GUI and More More stats 716
    Startups for Geeks More stats 682
    Google Maps – Jet Ski across Pacific Ocean More stats 670
    Not so AWkward after all: R GUI RKWard More stats 579
    Red R 1.8- Pretty GUI More stats 570
    Parallel Programming using R in Windows More stats 569
    R is an epic fail or is it just overhyped More stats 559
    Enterprise Linux rises rapidly:New Report More stats 537
    Rapid Miner- R Extension More stats 518
    Creating a Blog Aggregator for free More stats 504
    So which software is the best analytical software? Sigh- It depends More stats 473
    Revolution R for Linux More stats 465
    John Sall sets JMP 9 free to tango with R More stats 460

    So how do people come here –

    well I guess I owe Tal G for almost 9000 views ( incidentally I withdrew posting my blog from R- Bloggers and Analyticbridge blogs – due to SEO keyword reasons and some spam I was getting see (below))

    http://r-bloggers.com is still the CAT’s whiskers and I read it  a lot.

    I still dont know who linked my blog to a free sex movie site with 400 views but I have a few suspects.

    2009-12-31 to Today

    Referrer Views
    r-bloggers.com 9,131
    Reddit 3,829
    rattle.togaware.com 1,500
    Twitter 1,254
    Google Reader 1,215
    linkedin.com 717
    freesexmovie.irwanaf.com 422
    analyticbridge.com 341
    Google 327
    coolavenues.com 322
    Facebook 317
    kdnuggets.com 298
    dataminingblog.com 278
    en.wordpress.com 185
    google.co.in 151
    xianblog.wordpress.com 130
    inside-r.org 124
    decisionstats.com 119
    ifreestores.com 117
    bits.blogs.nytimes.com 108

    Still reading this post- gosh let me sell you some advertising. It is only $100 a month (yes its a recession)

    Advertisers are treated on First in -Last out (FILO)

    I have been told I am obsessed with SEO , but I dont care much for search engines apart from Google, and yes SEO is an interesting science (they should really re name it GEO or Google Engine Optimization)

    Apparently Hadley Wickham and Donald Farmer are big keywords for me so I should be more respectful I guess.

    Search Terms for 365 days ending 2010-12-31 (Summarized)

    2009-12-31 to Today

    Search Views
    libre office 925
    facebook analytics 798
    test drive a chrome notebook 467
    test drive a chrome notebook. 215
    r gui 203
    data mining 163
    wps sas lawsuit 158
    wordle.net 133
    wps sas 123
    google maps jet ski 123
    test drive chrome notebook 96
    sas wps 89
    sas wps lawsuit 85
    chrome notebook test drive 83
    decision stats 83
    best statistics software 74
    hadley wickham 72
    google maps jetski 72
    libreoffice 70
    doug savage 65
    hive tutorial 58
    funny india 56
    spss certification 52
    donald farmer microsoft 51
    best statistical software 49

    What about outgoing links? Apparently I need to find a way to ask Google to pay me for the free advertising I gave their chrome notebook launch. But since their search engine and browser is free to me, guess we are even steven.

    Clicks for 365 days ending 2010-12-31 (Summarized)

    2009-12-31 to Today

    URL Clicks
    rattle.togaware.com 378
    facebook.com/Decisionstats 355
    rapid-i.com/content/view/182/196 319
    services.google.com/fb/forms/cr48basic 313
    red-r.org 228
    decisionstats.wordpress.com/2010/05/07/the-top-statistical-softwares-gui 199
    teamwpc.co.uk/products/wps 162
    r4stats.com/popularity 148
    r-statistics.com/2010/04/r-and-the-google-summer-of-code-2010-accepted-students-and-projects 138
    socserv.mcmaster.ca/jfox/Misc/Rcmdr 138
    spss.com/certification 116
    learnr.wordpress.com 114
    dudeofdata.com/decisionstats 108
    r-project.org 107
    documentfoundation.org/faq 104
    goo.gl/maps/UISY 100
    inside-r.org/download 96
    en.wikibooks.org/wiki/R_Programming 92
    nytimes.com/external/readwriteweb/2010/12/07/07readwriteweb-report-google-offering-chrome-notebook-test-11919.html 92
    sourceforge.net/apps/mediawiki/rkward/index.php?title=Main_Page 92
    analyticdroid.togaware.com 88
    yeroon.net/ggplot2 87

    so in 2010,

    SAS remained top daddy in business analytics,

    R made revolutionary strides in terms of new packages,

    JMP  launched a new version,

    SPSS got integrated with Cognos,

    Oracle sued Google and did build a great Data Mining GUI,

    Libre Office gave you a non Oracle Open office ( or open even more office)

    2011 looks like  a fun year. Have safe partying .