Progress on the software developed under E-STAT Bill Browne and Chris Charlton.

Slides:



Advertisements
Similar presentations
Scatter Plots or Line of Best Fit Clipboard B Objective:To use scatter plots to write a line of best fit. Right click and click advance to advance slides!!
Advertisements

MCMC for Poisson response models
Introduction to Monte Carlo Markov chain (MCMC) methods
Other MCMC features in MLwiN and the MLwiN->WinBUGS interface
NCeSS e-Stat quantitative node Prof. William Browne & Prof. Jon Rasbash University of Bristol.
Florida International University COP 4770 Introduction of Weka.
1 Chapter 4 Curve Plotting with MATLAB MATLAB provides some very powerful features for plotting and labeling curves. These operations can be performed.
P5, M1, D1.
Stat-JR: eBooks Richard Parker. Quick overview To recap… Stat-JR uses templates to perform specific functions on datasets, e.g.: – 1LevelMod fits 1-level.
Creating Rout Paths Using CAMMaster. Step 1 Import Gerber File. Import Gerber File. User Ctrl+W to window around data. User Ctrl+W to window around data.
Welcome to Dave’s Data Demonstration This presentation is designed for users of SPSS with some familiarity with the program and a willingness to experiment.
J4www/jea Week 3 Version Slide edits: nas1 Format of lecture: Assignment context: CRUD - “update details” JSP models.
Project Title: Cobra Implementation on Association Service.
Java Server Pages Russell Beale. What are Java Server Pages? Separates content from presentation Good to use when lots of HTML to be presented to user,
By Hrishikesh Gadre Session I Introduction to EES Department of Mechanical Engineering Louisiana State University Engineering Equation.
Chapter 6 Graphical User Interface (GUI) and Object-Oriented Design (OOD)
DEMONSTRATION FOR SIGMA DATA ACQUISITION MODULES Tempatron Ltd Data Measurements Division Darwin Close Reading RG2 0TB UK T : +44 (0) F :
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
Introducing the STAT-JR software package Professor William Browne, School of Veterinary Science, University of Bristol.
by Chris Brown under Prof. Susan Rodger Duke University June 2012
Basics of Web Databases With the advent of Web database technology, Web pages are no longer static, but dynamic with connection to a back-end database.
XP New Perspectives on Microsoft Office Access 2003 Tutorial 12 1 Microsoft Office Access 2003 Tutorial 12 – Managing and Securing a Database.
Nael Alian Introduction to PHP
Introduction to Programming Workshop 1 PHYS1101 Discovery Skills in Physics Dr. Nigel Dipper Room 125d
1 CSC 221: Introduction to Programming Fall 2012 Functions & Modules  standard modules: math, random  Python documentation, help  user-defined functions,
BIT 142:Programming & Data Structures in C#. How To Use NUnit-based Starter Projects.
Java CGI Lecture notes by Theodoros Anagnostopoulos.
Introduction of Geoprocessing Topic 7a 4/10/2007.
POS 406 Java Technology And Beginning Java Code
BINF 634 Fall Lec 11 Visualization1 Plan for Tonight A synopsis of our progress through the course Lecture 11 Visualization in PERL Lab 2 Based.
Then click the box for Normal probability plot. In the box labeled Standardized Residual Plots, first click the checkbox for Histogram, Multiple Linear.
Getting Started with MATLAB 1. Fundamentals of MATLAB 2. Different Windows of MATLAB 1.
Jianguo Lu : regular expression and automata.
G.Corti, P.Robbe LHCb Software Week - 19 June 2009 FSR in Gauss: Generator’s statistics - What type of object is going in the FSR ? - How are the objects.
Introduction to Programming in R Department of Statistical Sciences and Operations Research Computation Seminar Series Speaker: Edward Boone
CS 4720 Dynamic Web Applications CS 4720 – Web & Mobile Systems.
Variables When programming it is often necessary to store a value for use later on in the program. A variable is a label given to a location in memory.
Introduction to Programming Workshop 6 PHYS1101 Discovery Skills in Physics Dr. Nigel Dipper Room 125d
Simple & Multiple Regression 1: Simple Regression - Prediction models 1.
Introduction to Matlab & Data Analysis 2015 In this tutorial we will: Build a practical application using GUIDE Learn more about graphical user interface.
MA/CS 375 Fall 2002 Lecture 3. Example 2 A is a matrix with 3 rows and 2 columns.
Example 13.2 Quarterly Sales of Johnson & Johnson Regression-Based Trend Models.
ProgLan Python Session 4. Functions are a convenient way to divide your code into useful blocks, allowing us to: order our code, make it more readable,
Introduction of Geoprocessing Lecture 9. Geoprocessing  Geoprocessing is any GIS operation used to manipulate data. A typical geoprocessing operation.
Implementing and Using the SIRWEB Interface Setup of the CGI script and web procfile Connecting to your database using HTML Retrieving data using the CGI.
Introduction to Matlab  Matlab is a software package for technical computation.  Matlab allows you to solve many numerical problems including - arrays.
ANOVA, Regression and Multiple Regression March
This tutorial will talk you through a very basic workbench queueing simulation. The queueing system modelled is of customers entering an infinite capacity.
MA/CS 375 Fall 2002 Lecture 2. Motivation for Suffering All This Math and Stuff Try the Actor demo from
Basic ActionScript and PHP Cis 126. Getting Started set up a basic folder structure so we can keep our files organized. Mirror this structure on your.
SAS ® is a very powerful tool when producing Graphics. A single graphical data step can easily create a Kaplan Meier Plot, but there is no single graphical.
Introduction of Geoprocessing Lecture 9 3/24/2008.
Dr. Abdullah Almutairi Spring PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used,
Bursts modelling Using WinBUGS Tim Watson May 2012 :diagnostics/ :transformation/ :investment planning/ :portfolio optimisation/ :investment economics/
Getting Started 27 June 2016 Week 1, Day 1. Who am I? Name: Christopher Little Town: Cambridge Eats: Chips.
● Preparing data sets ● CTD Data from Tomales Bay ● Clean up ● Binning ● Combined Temperature-Depth plots ● T-S scatter plots ● Multiple plots on a single.
Exsys Developer Tutorial
PH2150 Scientific Computing Skills
BINARY LOGISTIC REGRESSION
Fundamentals of Python: First Programs
Lesson 1 - Sequencing.
Data Virtualization Demoette… Custom Java Procedures
An Interactive Tutorial for SPSS 10.0 for Windows©
Tuples and Lists.
Explain what touch develop is to your students:
Engineering Innovation Center
Prepared by Kimberly Sayre and Jinbo Bi
An Introduction to StatJR
IST256 : Applications Programming for Information Systems
Python Basics with Jupyter Notebook
Presentation transcript:

Progress on the software developed under E-STAT Bill Browne and Chris Charlton

Why the slides? To remind me which templates to demonstrate Lets start with simply demonstrating 1 template Template1lev with the tutorial dataset and a regression model in E-STAT Run in E-STAT Show generated C code Show java script and explain the server possibilities Show the template code (maybe discuss input functions)

Explanation for following screenshots We show how to set up the model and run using the E-STAT engine The generated C code can be taken away and run on its own or modified by an algorithm writer The Java script code is similar however offers the opportunity of hosting the software on a server but running the estimation (via Java script) on the local machine.

Setting up first model

Equations for model and model code

Output from the E-STAT engine

Output of generated C code

View of Java Script source

Java Script output

Template input code class Template1Lev(Template): invars = ''' y = DataVector('response: ') D = Text('specify distribution: ', ['Normal', 'Binomial', 'Poisson']) if D.name == 'Binomial': n = DataVector('denominator: ') link = Text('specify link function: ', ['logit', 'probit', 'cloglog']) if D.name == 'Poisson': link = Text(value = 'ln') offset = Text('Is there an offset: ', ['yes', 'no']) if offset.name == 'yes': n = DataVector('offset: ') if D.name == 'Normal': tau = ParamScalar() sigma = ParamScalar() x = DataMatrix('explanatory variables: ') beta = ParamVector() beta.ncols = len(x.name) ''' This code matches with the inputs in the web interface

Stringing Templates together Use rats dataset and aim to fit random intercepts model: Use template split and demonstrate the view and summary buttons Form the dataset called ratlong Choose as template2lev and ratlong dataset. Again use view to look at the dataset created. Setup the random intercepts model

Viewing a data set via the view button

Summarising the data (like MLwiN names window)

Converting repeated measures data to a single response (Templatesplit)

Viewing the new dataset

Setting up a random intercepts model (with template2lev)

Output from the model

Rats continued Fit the model storing results in ratout Construct the VPC (= (1/tau_u)/((1/tau_u)+(1/tau)) !!!) using TemplateEvalute storing in ratsout again Then view the chain using TemplateColumndiag Finally look at the residuals using Templatecaterpillar

Using TemplateEvaluate to construct the VPC

View the file ratout (including VPC)

Using TemplateColumnDiag to look at the VPC

Set up templateCaterpillar for Caterpillar plot

Caterpillar plot

Other Stuff Graphics – show with tutorial (or with output u_1 and tau_u) TemplateXYlabel TemplateHistogram And then show the python code! Finally large numbers of model templates – some still to do depends on Bruces algebra system.

TemplateXYlabel

All code for templateXYlabel – quite a short template! from EStat.Templating import * from mako.template import Template as MakoTemplate class TemplateXYLabel(Template): invars = ''' yaxis = DataMatrix('Y values: ') xaxis = DataVector('X values: ') yaxislabel = Text('Y label: ') xaxislabel = Text('X label: ') '' def preparedata(self, data): self.data = data return self.data def resultdata(self, m): return self.data def graphdata(self, data): import numpy from matplotlib.figure import Figure import matplotlib.lines as lines from matplotlib.backends.backend_agg import FigureCanvasAgg import subprocess import tempfile import os fig = Figure(figsize=(8,8)) ax = fig.add_subplot( , xlabel = str(self.objects['xaxislabel'].name), ylabel = str(self.objects['yaxislabel'].name)) for n in self.objects['yaxis'].name: ax.plot(self.data[self.objects['xaxis'].name], self.data[n], 'x') canvas = FigureCanvasAgg(fig) directory = tempfile.mkdtemp() + os.sep canvas.print_figure(directory + 'xyplot.png', dpi=80) return directory + 'xyplot.png'

TemplateHistogram

Classification as index notation Tutorial dataset and Template2levindex Set up model then fire up Bruces demo (via notepad) Next show the C code Finally run the model Camille to demo interoperability later. Going off piste: Any other models ? Any suggestions for improvements, wish list etc.

Setting up model in E-Stat

Model Code in detail model { for (i in 1:length(normexam)) { normexam[i] ~ dnorm(mu[i], tau) mu[i] <- cons[i] * beta0 + standlrt[i] * beta1 + u[school[i]] * cons[i] } for (j in 1:length(u)) { u[j] ~ dnorm(0, tau_u) } # Priors beta0 ~ dflat() beta1 ~ dflat() tau ~ dgamma( , ) tau_u ~ dgamma( , ) }

Bruces Demo algebra system step for u

Generated C code – note the if statements for u

Model executed in E-Stat Note code takes longer but generalises easily to cross-classified models.

Interoperability with WinBUGS

Output from WinBUGS with multiple chains