This file documents changes in mle 2.1.17 to the current version 2.2.7. 2.2.0 - Added parallelization to statements for the linux (unix) versions, useful for multiprocessor machines PBEGIN..END runs each enclosed statement in parallel (a different child process) PFOR...END runs each for loop iteration in parallel (a different child process) PMODEL...END parallelizes the instances for models PDATA...END function forks off each observation added variables MAX_CHILDREN --> then greatest number of children to allow at one time WAIT_ON_CHILDREN --> the number of milliseconds to wait for a child to die 2.2.1 6 - removed a bit of left-over debugging code from statement 2.2.2 9 - Added the following functions: getpid --> current process id, unix only, dos gives 1 getppid --> parents process id, unix only, dos gives 0 fork --> I returns child id or 0. unix only, dos gives 0 waitpid(childid) --> returns status of child process when it ends findfirst(mask, attributes) --> returns (string) first file matching mask, attributes attributes are 1 = readonly 2 = hidden 4 = system file 8 = volumeID 16 = directory 32 = archive 64 = anyfile findnext --> returns (string) the next file matching mask, atttributes of findfirst fsearch(filename, dirlist) searches for filename in a semicolon-separated list of dirs note: on unix, the list may be colon separated. procedure findquit --> frees up space used by findfirst in unix, does nothing in DOS. function GETFILEBNAME(s) --> returns the base name of file name function GETFILEDRIVE(s) --> returns the file drive (e.g. C:foo --> C:) function GETFILEEXT(s) --> returns the file extension (e.g. C:foo.my.bar --> .bar) function GETFILEPATH(s) --> returns the full file path (e.g. C:/this/is/a/path/file.bat --> C:/this/is/a/path/) function GETFILEATTR(s) --> returns the file attributes procedure FILETIME(name:string, yr, var [mo, [dy, [hr, [min, [sec]]]]]:integer) returns - Modified the code to fix a standard output bug. -Added routines for bootstrapping on data frequencies 1. COPYDATAVAR(src, dest) -- copies src to dest. Both are datavars 2. BOOTSTRAP(src, dest) -- bootstraps dest using frequencies in src. Both are datavars -Added some vector statistic functions 1. VSUM(xarray, weightarray) complex, real, integer--> returns real weighted sum 2. VSUMSQ(xarray, weightarray) complex, real, integer--> returns real weighted sumsq 3. VMEAN(array, weightarray) complex, real, integer--> returns real weighted mean 4. VVARIANCE(xarray, weightarray) complex, real, integer--> returns real weighted variance 5. VSTDEV(xarray, weightarray) complex, real, integer--> returns real weighted stddev 6. VMIN(xarray) real, integer--> returns real, integer minimum 7. VMAX(xarray) real, integer--> returns real, integer maximum 8. VQUANTILE(xarray, weightarray, quantile) real, integer--> returns weighted quantile 9. VMEDIAN(xarray, weightarray) real, integer--> returns weighted median The variable ALT_VQUANTILE FALSE --> returns the standard estimator from vmedian and vquantile TRUE --> returns the Harrell-Davis estimator from vmedian and vquantile Harrell FE, Davis CE (1982) A new distribution-free quantile estimator. Biometrika 69:635-30. 10. procedure VSORT(x1array [x2array [x3array. . . ]]]) sorts real arrays by key x1array - Added ARRAYTODATA() procedure. - Fixed a bug in parallelized for loop. 2.2.3 - Fixed the 'good' flag in DMY2NDAYS 2.2.4 - Fixed a bug in data statement - Changed copyright date. - Added mean, geomean, and entropy statistics to print_lliks report. 2.2.5 - Added FREEPARAM() function--is the parameter currently a free model parameter? 2.2.6 - Added Romberg integrator (func.pas). Created I_ROMBERG constant (not documented). Also, made it so that when the integral is called, values > 1 are taken as integrate_n. Set default method to romberg (which is MANY times faster than QUAD or TRAP). Set default precision to 1e-8 (was 1e-6). 2.2.7 - changed ROUND to INT in COMB rounting to prevent integer overflows. - added ISPRIME function. 2.2.8 - added NOW function--returns seconds since 0 ad. - added PROFILEBEGIN and PROFILENEXT statements. I also had to create PROFILE_TIME -- time that current profile began PROFILE_ARRAY -- an array of profile times, incremented by PROFILENEXT PROFILE_INDEX -- the index into the current profile (NOT DOCUMENTED YET) 2.2.9 - added a newly coded version of the adaptive quadrature integration routine (you can try it by setting INTEGRATE_METHOD=5, but this may go away). It is very slightly faster than the existing routine (INTEGRATE_METHOD=AQUAD). It is still much slower than the RHOMBERG integrater - Fixed internal documentation for Weibull 2.2.10 - Changed the way areas are computed for discrete PDFs. Specifically, for intervals between t1 and t2 (t1 > t2) within the range of pdf XXX PDF XXX(t1, t2) p END for all discrete PDFS returns a different value. Call S(t) the survival function, f(t) the pdf. From version 2.1.16 until 2.2.9, the above PDF call returned: SUMMATION i (t1, t2) f(i) END That is, the area included both f(t1) and f(t2), and all values inbetween. Prior to 2.1.16 and begining with 2.2.10 again, discrete PDFs return S(t1) - S(t2) The real difference between the two is that f(t1) is not included in the latter. But this makes PDF XXX(t1, -1) return the SDF and PDF XXX(-999, t1) return the CDF. 2.2.11 - Add -q option to suppress header. - Changed array assignments so that the right hand side is reevaluated for every assignment. e.g. x : REAL[1 TO 100] = RAND will return an array of 100 random variables. - Fixed the POWER function that used to return zero when both arguments were positive integers. - Greatly increased the precision of the INVBETA, GAMMA, and BETA routines. - Added PDF F -- the Snedecor's F distribution - Fixed the STUDENTT function. It was returning the wrong area under for values < 0. - Added PDF STUDENTT, QUANTILE STUDENTT, etc. - Improved the LNGAMMA routine. - Fixed a bug in string comparison routine. 2.2.12 - added -e option that exectues a program from command line - started adding -ex that exectues an expression from command line 2.2.13 - added procedure drawdown(datavar, integer) that reduces datavar by int randomly drawn observations 2.2.14 - added function monthname(x) where x is -12 for "December" and 12 for "Dec" - added function weekdayname(x) where x is -7 for "Saturday" and 7 for "Sat" - clarified some error messages. 2.2.15 - modified for fpc 2.2.4. This produces significantly faster code - Fixed zipf documentation error (hat tip to Eric Gleave) - Added BEGIN END to the MODEL statement before and after Lik. - Added BEGIN END to the DATA/PDATA/LEVEL/LEVELDELTA statement before and after individual lik - Fixed COTH and CCOTH functions behavior at oo and -oo - Fixed COT, CSCH, CCSCH functions. - Made FISHER and FISHERINV complex functions - Made complex SQRT function work correctly at infinity and made the function faster for some special values. - Made PWR and CPWR function work faster for special values - Added a SLEEP(milliseconds) procedure - Made DATA function only restore d_idx within its loop if d_idx is not being looped over. 2.2.16 - Compiled in fpc 2.4.0 - Made versions for Windows x86-32, Windows x86-64, Linux x86-32, and FreeBSD x86-32 - Fixed the bivariate normal routine to robustly work for exact, interval censored, mixed, etc. - Added help description for bivariate normal - Replaced the normal_cdf() with a higher precision function 2.2.17 - Converted to compiling in fpc 2.4.0 exclusively--abandoned old Borland Pascal compatibility code - Changed error message generation to lead with name(line,col). Some editors and tools use this for debugging and jumping to the error in the mle file. - Fixed a broken VSORT function. - Some real functions are now called without intermediate variables to speed up execution. - Added some missing help message items. - Added TODAY function that returns an integer date - Changed NOW to be seconds since 1-Jan-1970, to avoid some precision issues - Added function FORMATDATE(x, formatstr). E.g. FORMATDATE(TODAY "Www, DD-Mmm-yyyy") returns "Thursday, 11-Feb-2010" The format string can be: -- format MONTH: M/m (1, 10), MM/mm (01, 12), MMM (DEC), Mmm (Dec), mmm (dec), MMMM (DECEMBER) mmmm (december) Mmmm (December) YEAR: Y/y (9), yy/YY (09) YYY/yyy (009), YYYY/yyyy (2009) DD/dd (01, 12) D/d (1, 12) WEEKDAY: w (t, w, r) W (T, W, R), ww (tu) WW (TU) Ww (Tu) www (tue) WWW (TUE) Www (Tue) WWWW (TUESDAY) wwww (tuesday) Wwww (Tuesday) YEARDAY: n (1, 10, 364), nn (01, 10, 364), nnn (001, 010, 364) - Updated OS name in header line, and got rid of compiler name (it is all FPC now) - Added function summary message to error message for bad function argument type - Added PADINT(i, w, c) function. Left-pads an integer with char c to w characters wide. - Changed PLOT and MULTIPLOT so that DEFAULTPLOTNAME is used if no PLOTFILE statement is given. - Added function INSERTSTR(s, snew, istart). Inserts snew into s starting at position istart. - Added function DELETESUBSTR(s, istart, ilen). Deletes from s, ilen characters starting at istart - Added function STRINGREPLACE(s1, sold, snew, first, casesen). Replaces in s1, all occurances of sold by snew. If first==TRUE, only the first instance is replaced, otherwise all are replaced. If casesen==TRUE, the search is case sensitive. - Added function POS(st1, subst) returns integer index of subst in st1 BUG LIST -- Windows 64 bit executable chokes on floating point overflow or underflow -- complex command lines in exec() function don't work in linux -- Compound extreme crashes when a parameter = 0 -- Von Mises quantiles are bad. -- Linear hazard allows negative hazards. Should flag these -- Gompertz can crash system with some bad values. -- Problem with DAYOFYEAR for very old dates.