Authors
=======

Stephane Germain <germste@gmail.com>
Pierre Valois <pierre.valois@fse.ulaval.ca>
Belkacem Abdous <belkacem.abdous@msp.ulaval.ca>

Description
===========

This add-in for Excel provide a 'wizard' to estimates the items and
latent variables from the responses of subjects to a
questionnaire. The supported dichotomous IRT (Item Response
Theory) models are the 1PLM (one parameter logistic model), the
2PLM (two parameter logistic model) and the 3PLM (three
parameter logistic model). For polytomous items, Bock's nominal
model, and Samejima's graded model are supported. Two
nonparametric methods (kernel regression an PMMLE) are also
supported.  The estimations methods available are the MMLE
(marginal maximum likelihood estimator) and the BME (Bayes
modal estimator, for dichotomous models only) for the
parametric estimation of items, the PMMLE (Penalized MMLE) and
the kernel regression (Nadaraya-Watson) for the nonparametric
estimation of items, and the EAP (expectation a posteriori) and
WMLE (Warm's maximum likelihood estimator) for the latent
variable predictions.

License
=======

GPL version 2 or newer

Directories
===========

bin\ The compiled dll.

setup\ The setup scripts.

xls\ The Excel files.

doc\ The documentation.

examples\ The examples.

vba\ The exported vba code (out of date).


Installation
============

Use the setup program named 'eirt-?.?.?.exe' from 'http://libirt.sf.net'.

Once installed, start Excel, select the data to analyse and start the wizard
from the 'eirt' submenu in the 'tools' menu.

For usage documentation, see the inline help.

Fixing a 'missing add-in' message in Excel
==========================================

If after a uninstall, Excel give you an error message, go to the 'tools'
menu, use the 'add-in' option, and uncheck 'eirt'.

Then if you have already reinstalled the program, go to the 'start'
menu, 'Programs', 'eirt' and use the option 'Install in Excel's menu'.

Adding a new language or changing the text
==========================================

If you want to translate this program in another language (now available
in english and french), contact me <germste@gmail.com>.

The localized string are in the 'gettext' worksheet of 'eirt.xla'.
To view this sheet you have to set the 'IsAddin' property of the workbook
to 'False' (you have to do Alt-F11 in Excel to see the property of the
workbook and the VBA code).

If you add a new string or add a new language, you have to recreate the
names. Select everything, go to the 'Names' submenu of the 'Insert' menu,
use the 'Create' option, check only 'Left column' then click 'ok' and save.

If you add a new language you also have to increment the 'NbrLang' constant
in the module 'modGlobal', Then this langage will be available in the
'Settings' form.

Compiling the dll
=================

To compile the library 'eirt.dll', follow these steps:

     1. Download and install the 'GNU Scientific Library' from 
        'http://www.gnu.org/software/gsl/' and the 'libirt' 
        library from 'http://libirt.sf.net'. Follow the installation
        instructions at the end of the 'INSTALL' file of 'libirt'.
        These library should be compile with the '-mrtd' flag
        to use the 'stdcall' convention.

     2. Download 'rirt' from 'http://libirt.sf.net', but you don't
        have to install it, just copy 'irt_wrapper.c' from the 'src'
        directory of this package to the source directory of 'eirt'.

     3. Open a 'msys' shell (installed in step 1), cd to the directory
        of 'eirt' and type:

        gcc -c -DHAVE_INLINE -DGSL_RANGE_CHECK_OFF -O3 -mrtd \
             -L/c/gsl-mrtd/lib -I/c/gsl-mrtd/include \
             -L/c/libirt-mrtd/lib -I/c/libirt-mrtd/include \
             irt_wrapper.c

       dllwrap -mrtd --def export.def -o eirt.dll irt_wrapper.o \
            -lirt -lgsl -lgslcblas -L/c/libirt-mrtd/lib -L/c/gsl-mrtd/lib

       where we assume you have installed 'gsl' in 'C:/libirt-mrtd'
       and 'libirt' in 'C:/libirt-mrtd'.


Building the setup program
==========================

     1. Download and install 'Inno Setup' from 'http://www.jrsoftware.org'.

     2. Open 'eirt.iss'.

     3. Compile the setup.


Troubleshooting
===============

General troubleshooting procedure :

     1. Uninstall eirt with the "Uninstall eirt" item in the menu
        start/All Programs/eirt.

     2. Reboot the computer.

     3. Delete the directory c:\Program Files\eirt and all its content
        if it still exists.

     4. Search and delete any other instance of eirt.dll and eirt.xla
        on your hard drive.

     5. Close all Excel and Office open files.

     6. Install the latest version of eirt available here :
        http://sf.net/projects/libirt/files/eirt/
        and enable the macros in Excel when prompted, see these
        screenshots : http://libirt.sf.net/screenshots/install/

     7. Try an example dataset provided with eirt :
        http://libirt.sf.net/screenshots/example/

If after the above procedure the problem persists, send an email to
germste@gmail.com with these informations :

     1. A description of the problem, the exact error message, a
        screenshot and the dataset used if possible.

     2. The version of eirt used.

     3. The content of the Path environnement variable. One way to see it
        is with the command "echo %Path%", see the screenshots
        http://libirt.sf.net/screenshots/diagnostic/

     4. The size and date of the file c:\Program Files\eirt\bin\eirt.dll
        if it exists.

     5. The version of Windows (eg Windows 7 Ultimate 64bit).

     6. The version of Excel (eg Office 2010 Enterprise 32bit).
