Kaplan-Meier Survival Plot – with at risk table
Credit for the bulk of this code is to Abhijit Dasgupta and the commenters on the original post here from earlier this year. I have made a few changes to the functionality of this which I think warrant...
View ArticleLatent class mixed models – with graphics
Foreword Apologies that the output isn’t showing well as far as spacing and alignment is concerned. Am working on fixing that! Background Generally when we have a set of data, we have known groupings....
View ArticleGraphing – margins, titles, mtext, workspace
This is a great post, very true, not enough of R’s graphics are well displayed online to really see how to achieve what the often ambiguous ‘help’ information suggests....
View ArticleChild health metrics
In analysis of Child Health data, generally z-scores or percentile groupings are used as children do not growth is not linear. The CDC (Center for Disease Control and Prevention) have released tables...
View ArticleMixed Models – Part 1
Very brief. Have been exploring mixed models in R using nlme::lme. Am looking forward to understanding them more, they’re going to be used more and more in years to come I’ve no doubt of that. Here are...
View ArticleAutomatic descriptive statistic tables
Here is some code I worked on a while back to make the process of generating descriptive tables quicker. This was driven by constantly making data frames for and calculating means or counts for either...
View ArticleColours for R graphs
Here is an extensive list of colours to be used in graphs in R. http://research.stowers-institute.org/efg/R/Color/Chart/
View ArticleCalculating Age
Both ‘first’ and ‘second’ need to be date vectors. This is to achieve a calculation of age rounded DOWN in the same way that we say our age (as in we say 17, right up until the day we turn 18)....
View Article