Presentation on theme: "Course round-up subtitle- Statistical model building Marian Scott University of Glasgow Glasgow, Aug 2013."— Presentation transcript:
Course round-up subtitle- Statistical model building Marian Scott University of Glasgow Glasgow, Aug 2013
Step 1 why do you want to build a model- what is your objective? what data are available and how were they collected? is there a natural response or outcome and other explanatory variables or covariates?
Modelling objectives explore relationships make predictions improve understanding test hypotheses
Conceptual system Data Model Policy inputs & parameters model results feedbacks
Value judgements Different criteria of unequal importance key comparison often comparison to observational data (RSS, AIC......) but such comparisons must include the model uncertainties and the uncertainties on the observational data.
Questions we ask about models Is the model valid? Are the assumptions reasonable? Does the model make sense based on best scientific knowledge? Is the model credible? Do the model predictions match the observed data? How uncertain are the results?
Stages in modelling Design and conceptualisation: – Visualisation of structure – Identification of processes – Choice of parameterisation Fitting and assessment – parameter estimation (calibration) – Goodness of fit
a visual model- atmospheric flux of pollutants Atmospheric pollutants dispersed over Europe In the 1970 considerable environmental damage caused by acid rain International action Development of EMEP programme, models and measurements
The mathematical flux model L: Monin-Obukhov length u*: Friction velocity of wind c p : constant (=1.01) : constant (=1246 gm -3 ) T: air temperature (in Kelvin) k: constant (=0.41) g: gravitational force (=9.81m/s) H: the rate of heat transfer per unit area gasht: Current height that measurements are taken at. d: zero plane displacement
what would a statistician do if confronted with this problem? Look at the data understand the measurement processes think about how the scientific knowledge, conceptual model relates to what we have measured
Step 2- understand your data study your data learn its properties tools- graphical
measured atmospheric fluxes for 1997 measured fluxes for 1997 are still noisy. Is there a statistical signal and at what timescale?
Key properties of any measurement Accuracy refers to the deviation of the measurement from the true value Precision refers to the variation in a series of replicate measurements (obtained under identical conditions)
Accurate Imprecise Inaccurate Precise Accuracy and precision
Data properties Nature and distribution of the data- continuous, counts.... Normal, exponential, poisson, maybe need a transformation Missing data- outliers- limits of detection Use pictures to explore
Step 3- build the statistical model Outcomes or Responses Causes or Explanations these are the conditions or environment within which the outcomes or responses have been observed -the covariates. This has very much been the focus of much of the week- whether a linear model, a smooth flexible model, a time series model, a bayesian model.....
Are you a bayesian? What does that mean? It means, you have prior information (belief) that you want to include in your statistical model You need to find a way of capturing this in the prior distribution Model output then a posterior distribution on the quantity of interest- automatically incorporates uncertainty
Calibration-using the data A good idea, if possible to have a training and a test set of data-split the data (90%/10%) Fit the model using the training set, evaluate the model using the test set. why? because if we assess how well the model performs on the data that were used to fit it, then we are being over optimistic other methods: bootstrap and jackknife
Which variables to include Use your science knowledge Use pictures to look for patterns Maybe use some of the more algorithmic ways to select the set (stepwise, BSR...) How to compare models? Nested models (ANOVA, likelihood ratio test)
Uncertainty and sensitivity analysis
Uncertainty (in variables, models, parameters, data) what are uncertainty and sensitivity analyses?
Modelling tools - SA/UA Sensitivity analysis determining the amount and kind of change produced in the model predictions by a change in a model parameter Uncertainty analysis an assessment/quantification of the uncertainties associated with the parameters, the data and the model structure.
SA flow chart ( Saltelli, Chan and Scott, 2000)
Design of the SA experiment Simple factorial designs (one at a time) Factorial designs (including potential interaction terms) Fractional factorial designs Important difference: design in the context of computer code experiments – random variation due to variation in experimental units does not exist.
Global SA Global SA apportions the output uncertainty to the uncertainty in the input factors, covering their entire range space. A global method evaluates the effect of x j while all other x i,i j are varied as well.
How is a sampling (global) based SA implemented? Step 1:define model, input factors and outputs Step 2:assign p.d.f.s to input parameters/factors and if necessary covariance structure. DIFFICULT Step 3:simulate realisations from the parameter pdfs to generate a set of model runs giving the set of output values.
SA -analysis At the end of the computer experiment, data is of the form (y ij, x 1i,x 2i,….,x ni ), where x 1,..,x n are the realisations of the input factors. Analysis includes regression analysis (on raw and ranked values), standard hypothesis tests of distribution (mean and variance) for subsamples corresponding to given percentiles of x, and Analysis of Variance.
How can SA/UA help? SA/UA have a role to play in all modelling stages: – We learn about model behaviour and robustness to change; – We can generate an envelope of outcomes and see whether the observations fall within the envelope; – We can tune the model and identify reasons/causes for differences between model and observations
On the other hand - Uncertainty analysis Parameter uncertainty – usually quantified in form of a distribution. Model structural uncertainty – more than one model may be fit, expressed as a prior on model structure. Scenario uncertainty – uncertainty on future conditions.
An uncertainty example ( Ron Smith ) Original Mean of 100 simulations Standard deviation
An uncertainty example CV from 100 simulations Possible bias from 100 simulations
An uncertainty example model sensitivity analysis identifies weak areas lack of knowledge of accuracy of inputs a significant problem there may be biases in the model output which, although probably small in this case, may be important Model emulators have become popular
Take home message Only able to give you a flavour of what might be possible Good environmental science and good statistical science is key for all problems Think critically- test and re-test your hypotheses and assumptions
Take home message Resources Many good books (have seen some of these over the sessions- not one size fits all JISC mail list- Envstat (worth joining) Royal Statistical Society has an Environmental Statistics section, sometimes holds tutorial meetings on topics.