If you use these functions, please cite our work:

Finding archetypal patterns for binary questionnaires

-Directory Archetypal functions contains files for computing AA, ADA in the multivariate and functional case:

   *Files beginning with letter L are for multivariate AA and ADA.

   *Files beginning with letter F are for (univariate) functional AA and ADA.
   

-Directory Simulation contains files for reproducing results in the Section Simulation:

   *comparematchingmodel.m is the main function in matlab. It uses functions from https://github.com/aalab/paa
	The main function calls other functions in that directory: nonstand_aa.m and nonstand_aa.R for AA and
	ada3.m and ada3.R for ADA. Note that for reproduction, the name of the directory where data are saved should be changed. 

-Directory Applications contains files for reproducing the results in the Section Applications, and it is divided into 2 directories:

   *Directory UJI (first application):

		>responses.txt contains the data, a 690 x 21 binary matrix.
		> UJI.R has the R code for obtaining the results in Sect. 5.1.2.


   *Directory ACT (second application):

		>actm.txt contains the data, from http://www.stats.ox.ac.uk/~silverma/fdacasebook/testitems.html
		>actmR.txt contains the same data, but formatted for being reading in R: it is a 2115 x 60 binary matrix.
		>Ramsay_Silverman_functions.m contains the code for reproducing results of Chap. 9 of Ramsay and Silverman book
		that uses those data and also the paper 'Nonparametric Item Response Function Estimates with the EM Algorithm' by
		Rossi, Wang and Ramsay (2002), i.e. estimating item response functions and FPCA.
		> Wfd.mat has the log odds-ratio functions.
		> adaWfd.R has the R code for obtaining the FADA results in Sect. 5.2.2
		> adaotherIRF.R has the R code for obtaining the FADA results in Sect. 5.2.3.
		
