Overview
This repository contains an implementation of the Morris screening method for global sensitivity analysis, based on the work by Morris (1991) and Campolongo and Saltelli (1997). The method is used to identify the most influential input parameters in a model by generating elementary effects (EEi) through oriented sampling. The code is relatively simple and self-contained, with comments in the source files explaining the logic. It includes:
morris.m:__ The core function for generating the Morris sampling matrix.
MorrisScreeningTestFunction.m: A tutorial script demonstrating the method on the Ishigami test function, including sampling, simulation, computation of elementary effects, and visualization.
This is an initial version; expansions (e.g., more test functions, advanced metrics, or integration with other sensitivity tools) are planned.
Requirements
MATLAB (tested on R2020a or later; no additional toolboxes required beyond base MATLAB). Basic plotting capabilities (uses built-in functions like plotmatrix, hist, etc.). Usage Core Function: morris.m Generates the oriented sampling matrix for Morris screening. Syntax: matlabX = morris(p, dt, k, r);
Inputs: p: Number of levels (e.g., 4, 6, or 8). dt: Incremental factor (typically p/(2*(p-1))). k: Number of input factors/parameters. r: Number of orientations/repetitions (e.g., 4-15 for elementary effects calculation).
Output: X: Sampling matrix of size r*(k+1) x k (uniform [0,1] space).
Refer to inline comments in morris.m for detailed steps. Tutorial Script: MorrisScreeningTestFunction.m This script applies the Morris method to the Ishigami function as a demonstration.
Run the script directly in MATLAB:matlabMorrisScreeningTestFunction It performs: Step 1: Morris sampling. Step 2: Model simulations. Step 3: Visualization of results. Step 4: Computation of elementary effects (EEi), mean (μ), absolute mean (μ*), and standard deviation (σ). Step 5: Plotting histograms, μ-σ scatter, and importance ranking.
Outputs include figures saved as TIFF files (e.g., MorrisSamples.tiff, HistogramEEi.tiff).
Modify the model function f, parameter names pars, bounds lbs/ubs, or sampling parameters (k, p, dt, r) to adapt to your own model. Example For the Ishigami function (a common sensitivity analysis benchmark):
Inputs: Three parameters x1, x2, x3 uniformly distributed in [-π, π]. The script generates samples, evaluates the function, computes EEi, and ranks parameters by influence (typically x1 and x3 interactive, x2 non-linear).
Expected output plots:
Scatter matrix of samples. Histogram of EEi per parameter. μ-σ plot for interaction/non-linearity assessment. Bar chart of μ* for ranking.
References
Morris, M. D. (1991). Factorial sampling plans for preliminary computational experiments. Technometrics, 33(2), 161-174.
Campolongo, F., & Saltelli, A. (1997). Sensitivity analysis of an environmental model: an application of different analysis methods. Reliability Engineering & System Safety, 57(1), 49-69.
Sin, G., Meyer, A. S., & Gernaey, K. V. (2010). Assessing reliability of cellulose hydrolysis models to support biofuel process design—Identifiability and uncertainty analysis. Computers & Chemical Engineering, 34(9), 1385-1392. https://doi.org/10.1016/j.compchemeng.2010.02.012
Ishigami function: https://www.sfu.ca/~ssurjano/ishigami.html
License This project is licensed under the MIT License - see the LICENSE file for details.
Contributing Feel free to fork, expand, or submit pull requests. Future ideas: Add support for more distributions,block sampling, add more examples for tutorials, etc. If you encounter issues or have suggestions, open an issue on GitHub. Maintained by [Gürkan/GSI Lab]. Last updated: February 2026.