## Analysis for design

A lecture about who to analyse (board) games using statistics, probability theory and simulations. Link to the slides if Slide Share plugin does not work: http://www.slideshare.net/lankoski/analysis-for-design Scripts used to analyse games and visualise data:  http://www.mediafire.com/download/whucaos4v9chv40/AnalysisForDesignScripts.zip

## Model–data comparison

I wrote some code to check my ordinal / clmm models against the data (and to learn to use ggplo2). The function pred() is from clmm tutorial to calculate predictions based on the model. The function plot.probabilities3() is for plotting prediction and distribution form the data. Update: changed extreme subject visualization.  Area seemed not appropriateContinue reading “Model–data comparison”

## R / Ordinal Scrips, part 2

Visualizing random effects when using  ordinal package and clmm. This function is based on clmm2 tutorial code and illustrates the effects of each judge taste on evaluating the bitterness of wines.

## R / Ordinal Scripts

Update: Added visualizations produced with the scripts Update 2: Updated plot.probabilities() so that response variable can have arbitrary levels I have been using ordinal package to crunch data. Tutorial for mixed models is only for clmm2 and not for clmm. Here are code for visualizing predicted probabilities for clmm. All the code is  based on  clmm2 tutorial.

## Rpy2 and drawing pie diagram

Here is code that I come up with for drawing a pie diagram using rpy2. The function takes two lists. Function takes two lists: data contains frequencies and labels labels. The argument title set the title text of chart. Radius sets the radius of pie (max 1.0). Font size 1 is default, 1.5 is 50%Continue reading “Rpy2 and drawing pie diagram”

## Calculating correlation with rpy2

I spend some time trying to figure out how to use R via Rpy2. Here are a short python code that I used to calculate correlation using Rpy2 import rpy2.robjects as robjects def get_rcorr(floatData, n_rows, method=”spearman”): “”” floatData: list of floats, number of rows in the data matrix Hmisc library needs to be loaded beforeContinue reading “Calculating correlation with rpy2”