/* Copyright 2007 Brendan Halpin brendan.halpin@ul.ie Distribution is permitted under the terms of the GNU General Public Licence */ #delimit ; capture program drop elzspell; capture program drop combin; program elzspell, plugin; program define combin; version 9; syntax varlist [if] [in] [using/] , LENgth(string) NSTates(real) PWSim(string); marksample touse; tempvar idvar; tempvar lengthvar; gen `lengthvar' = `length'; /* replace `lengthvar' = `maxlength' if `lengthvar' > `maxlength'; */ gen `idvar'=_n; matrix `pwsim' = J(_N,_N,0); /* Arguments hardcoded into elzspell 0: result matrix name 1: n-states */ di "Running spell-wise Elzinga sequence comparisons"; plugin call elzspell `idvar' `lengthvar' `varlist', `pwsim' `nstates' 0; end;