Authors
=======

Stephane Germain <stephane@psychometricon.net>
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 
'https://psychometricon.net/libirt/releases'.

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 <stephane@psychometricon.net>.

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 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 'https://psychometricon.net/libirt/'. 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 'https://psychometricon.net/libirt/', 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 (x86)\eirt" and all its content
        if it still exists.

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

     5. In Excel go to "Files", "Options", "Add-ins" and click on the "Go..." button 
        right of the select box "Manage: Excel Add-ins".
        In the Add-ins window, select and then unselect "Eirt", 
        and accept to remove it when prompted to do so because the path is not found.
     
     6. Close all Excel and Office open files.

     7. Install the latest version of eirt available here :
        https://psychometricon.net/libirt/
        and enable the macros in Excel when prompted, see these
        screenshots :https://psychometricon.net/libirt/screenshots/install/

     8. Try an example dataset provided with eirt :
        https://psychometricon.net/libirt/screenshots/example/

If after the above procedure the problem persists, send an email to
stephane@psychometricon.net 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
        https://psychometricon.net/libirt/screenshots/diagnostic/

     4. The size and date of the files 
        "c:\Program Files (x86)\eirt\bin\eirt.dll" , "c:\Program Files (x86)\eirt\bin\eirt64.dll" ,
        "c:\Program Files (x86)\eirt\xls\eirt.xla" , "c:\Program Files (x86)\eirt\xls\eirt.xlam"
        if they exists.

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

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