Examples Using NAG and Excel

All the example spreadsheets below use 32-bit NAG Libraries and can be used with 32-bit versions of Microsoft Excel only. 64-bit versions of some examples can be made available upon request. Please contact us via support@nag.co.uk for more information.

Most of the examples here are based on the Mark 24 NAG Library. You will need to update the name of the DLL in the Declare statements to use them with newer Library releases. If you need help with this conversion, please contact us.

Basic examples:

Advanced examples:

NAG Statistical Add-Ins for Excel

The NAG Statistical Add-Ins contain a considerable number of statistical routines grouped together in one spreadsheet. These include functions for:

  • Simple statistics
  • Regression Analysis
  • Time Series Modelling
  • GLMs
  • PCA
  • Factor, Cluster, and Discriminant Analyses
  • Nonparametric tests
  • And others…

All functions can be called via Excel's function wizard and the spreadsheet is supplied with a NAG menu with utilities for expanding the results and extracting formatted data.

The spreadsheet works with the 32-bit NAG Fortran Library FLDLL244ML with Excel 2003, 2007, and 2010 (32-bit).

The zip file contains the Excel spreadsheet, a README file and Windows help file.

Please note, that in order to be able to read the help file on Windows Vista and later versions of Windows you need to download a Windows Help component from http://support.microsoft.com/kb/917607 free of charge. To avoid any potential problems with the Microsoft Validation Program, you might consider using Internet Explorer to perform this download.

If you wish to use the Add-Ins in 64-bit Excel please contact support@nag.co.uk.

NAG Survival Analysis for Excel

The NAG Survival Analysis spreadsheet contains functions to:

  • Compute Kaplan–Meier estimates of survival probabilities (with plots)
  • Compute rank statistics for comparing survival curves
  • Fit Cox's proportional hazard model

All functions can be called via Excel's function wizard and the spreadsheet is supplied with a NAG menu with utilities for expanding the results and extracting formatted data.

The spreadsheet works with the 32-bit NAG Fortran Library FLDLL244ML with Excel 2003, 2007, and 2010 (32-bit).

The zip file contains the Excel spreadsheet and a README file.

If you wish to use the Add-Ins in 64-bit Excel please contact support@nag.co.uk.

  • Using the NAG Library for .NET in Excel

    This archive contains a demo which uses methods from the NAG Library for .NET in an Excel spreadsheet to fit a bicubic spline surface to a set of points in three-dimensional space. More information about the demo can be found in this README (a copy of which is also contained in the archive).

 


If you wish to use any of these examples you need to have the appropriate NAG Library installed. All the examples above use 32-bit NAG Libraries. 64-bit versions are available upon request. If you wish to use these NAG Excel examples in 64-bit Excel please contact sales@nag.co.uk. The table below shows NAG Product codes depending on which version of Excel and which type of NAG Library you use.

 

 
NAG Fortran Library for Windows
NAG C Library for Windows
32-bit Excel
FLDLL254ML
CLW3225DAL
64-bit Excel
FLW6I25DCL
CLW6I25DAL

 

To access a trial of these libraries please go to our download page. To run the demonstrations effectively you must have macros enabled in Excel. We suggest you save the file (using right click 'Save As') and then open from the saved location. Before you run a demonstration please refer to the Help and Information buttons within the Excel workbook, where available. The examples are supplied with the appropriate VB headers. If you would like to call other routines from the NAG Library, please obtain the headers as detailed near the bottom of the NAG and Excel Homepage.

Additional examples of calling NAG Library routines from Excel are available for all of the above libraries. For the C Libraries, these examples are available for download for CLW3225DAL and CLW6I25DAL. For FLDLL254ML and FLW6I25DCL, once the Library has been downloaded and installed, the examples can be found in the samples\excel_examples or samples\excel64_examples subdirectory of the Library installation directory respectively.