# Cases that still differ from Stata 14 for a known reason. compare.py marks
# them with "~~" and does not fail because of them. Remove the line when the
# case matches again (for example, after producing the reference again in Stata).
# format: case-name  reason
# or:     case-name  ignore(/REGEX/) reason  -- only the lines matching REGEX may differ
#         case-name  tolerance(REL) reason   -- numbers may differ by REL (relative, at least 1)
#         case-name  skip(/REGEX/) reason       -- the output of the commands whose `. command` line matches REGEX is not compared
# (the limits can be combined; the rest of the log must still be equal)
0302_tabulate         tabulate, exact on a 2x3 table: OpenDTA does not print the progress of the network algorithm
0307_aleatorios       rnormal(), runiformint() and rpoisson() do not reproduce Stata yet (runiform, rbinomial, rchi2(2) and rexponential already do)
0309_aleatorios_2     same reason as 0307 (rnormal uses three uniforms per draw, an undocumented algorithm)
0406_mata_optimize    with a d0 evaluator, the gradient at the optimum and the last digits of V are noise from the numerical derivatives (~1e-12 and ~1e-8); Stata's step search is not documented in detail. Iteration log, parameters, value and the d1 case match
0507_poisson          with exposure(t), the upper CI limit of _cons differs in the 7th digit (.102692 vs .1026919): Stata reports a point not yet fully converged; coefficients, log and other lines match
0512_nbreg            Stata's starting values are undocumented: iteration 0 of the Poisson comes out -245.3105 (Stata -245.31049) and iterations 0 and 1 of the full model differ; the final point differs in the 8th digit of alpha (robust /lnalpha CI in the 7th). Coefficients, standard errors, tests and e() match
0513_tobit            Stata 14's tobit takes the standard errors from a numerical Hessian (~1e-5 relative difference) and stops before full convergence (ll in the 10th digit); coefficients, header and e() match
0514_fweight_robust   tolerance(1e-9) ologit, vce(cluster g): one element of e(V) is .07686639604990..., on the rounding boundary of its 10th significant digit in format %12.0g; floating-point noise of about 1e-12 between platforms shows it as .076866396 or .0768663961. Every other number and the layout match
0801_testes           swilk with tied values (Stata uses coefficients with average ranks, an undocumented rule; without ties it matches) and the kwallis chi2 in the 7th digit (undocumented internal formula; the adjusted chi2, df and displayed p match)
0802_anova_estat      the estat hettest chi2 is close to zero (9e-5) and Stata computes it with numerical cancellation: it differs from the 11th digit on
0803_codebook_bootstrap  the bootstrap replicates use OpenDTA's resampling (the draw order of Stata's bsample is undocumented): standard errors and intervals differ; layout, observed estimates, codebook and misstable match
0602_svy_ampliado     in svy: nbreg alpha goes to the boundary (ln alpha ≈ -37) and the displayed /lnalpha depends on the optimizer's path (coefficients and standard errors match, as in the Poisson); two numbers differ in the 7th digit (/cut2 of svy: ologit and _cons of svy: glm), noise from the convergence criterion
0804_comandos         the qreg iteration log is not reproduced (Stata's internal algorithm is undocumented; coefficients, standard errors and e() match); xtpoisson, re and xtlogit, re take their standard errors from numerical derivatives and differ in the 7th digit (iteration 1 of xtpoisson, in the 8th); lowess differs by 1 float ulp at two extremes; the hausman chi2 differs in the 11th digit
1201_mi               the imputed values come from OpenDTA's random-number generator (Stata's order of draws in mi impute is undocumented): imputed values and combined estimates differ; layout, counts and the combination rules can be compared
0902_stcox_streg      ignore(/^Iteration \d+: +log (pseudo)?likelihood = +-1[4-9]\d\.|^ +e\(aux_p\) = /) Stata's iteration path for streg with the Weibull, lognormal and loglogistic distributions is undocumented (step sizes of the constant-only Weibull fit and starting values of the location-scale models): the iteration lines differ and e(aux_p) differs in the 10th digit; the estimates, standard errors, tests and the rest of the log match
0308_merge_append     ignore(/^  [12]\. \| 1   10   both in master and using data   [xy] \|$/) Stata's joinby, unmatched(both) lists the two matches of k = 1 in either order from one run to the next (it changed between two runs of the same do-file)
0408_mata_moptimize   ignore(/^Iteration \d+: +f\(p\) = /) tolerance(1e-8) moptimize: Stata's step lengths are undocumented (iteration 1 of the lf model and the path of the lf2 model from a non-concave start differ); the estimates agree to 9 significant digits
1001_mixed            tolerance(2e-5) mixed: Stata stops its EM and gradient iterations about 1e-6 (relative) away from the maximum of the likelihood, which OpenDTA reaches exactly; variance components, their standard errors and the numbers that depend on them differ in the 6th or 7th digit, and the upper confidence bound of the small random-slope variance in the 5th (up to 1.3e-5 on Windows, whose floating-point results differ slightly from run to run)
1002_melogit          ignore(/^(Iteration \d+:|Grid node \d+:)| e\(ic\) = /) tolerance(1e-3) melogit/meprobit/mepoisson: Stata's starting values (fixed-effects fit and the grid) and the details of its adaptive quadrature are undocumented; the log likelihoods agree and the estimates differ from the 4th or 5th digit (random slope)
1101_ts               tolerance(1e-6) arima y, ar(1 2): the BHHH log and estimates match Stata's; one coefficient sits on a rounding boundary of its 7th digit (.47549945), which the numerical scores move either way
1102_arima_ma         ignore(/^Iteration \d+: +log likelihood = /) tolerance(1e-2) arima with MA terms: Stata's starting values for the MA coefficients are undocumented, so the BHHH/BFGS path stops at a slightly different point of a flat likelihood (same log likelihood to 4 decimals); estimates differ from the 4th digit
0805_completados      ignore(/^Iteration \d+: +(tolerance|log likelihood) = |^ +e\(dif\) = |^ +rho \|/) tolerance(2e-6) xtgee, corr(independent): the tolerance of its single iteration and e(dif) are rounding noise; xtreg, mle: Stata's starting values are undocumented (iteration lines differ), the last digit of some standard errors differs and so does the interval of rho (undocumented transformation); estimates, tests and the rest match
1301_power            ignore(/^ +r\((iter|deltax|function)\) = /) power: r(iter), r(deltax) and r(function) report the steps of Stata's root finder, which is undocumented; sample sizes, power and effect sizes match
1302_sem              ignore(/^Iteration \d+: +log likelihood = /) tolerance(5e-6) sem: Stata's starting values are undocumented (iteration 0 differs) and Stata stops slightly before the maximum, so a few estimates differ in the 7th digit
1401_epitab           ignore(/\((exact|Cornfield)\)$|^ +r\((lb|ub)_(or|afe)\) = |^ +\d+ \| +\d+\.\d{6} +\d+\.\d{2} +\d\.\d{4} +\d+\.\d{6} +\d+\.\d{6}$|^ +\d+\.\d{6} +\d+\.\d{2} +\d\.\d{4} +\d+\.\d{6} +\d+\.\d{6}$/) tolerance(1e-6) exact and Cornfield odds-ratio limits differ in the 4th-5th digit (Stata stops its search before the root, an undocumented rule); the confidence limits of the Mantel-Haenszel odds ratios of tabodds and mhodds use an undocumented method (Woolf, Robins-Breslow-Greenland, exact, mid-p, Cornfield, test-based and the conditional standard error were tried); r(chi2_mh) is stored in single precision (noise in the 8th digit)
1402_kappa_roc        ignore(/^ +109 +0\.8932 +0\.03/) tolerance(1e-4) roctab, hanley: Stata's standard error (.0320) is not the formula of Hanley and McNeil (1982) (.0325); rocfit: Stata stops its iterations slightly before the maximum, so e(chi2_gf) differs in the 5th digit and the indices in the 7th-8th
1601_epidemiology     ignore(/\((exact|N|P|BC)\)$|^ [IE]\. Standardized \||^ +r\((lb|ub)_or\) = |^ +\d+ \| +\d+\.\d{6} +\d+\.\d{2} +\d\.\d{4} +\d+\.\d{5} +\d+\.\d{5}$|^ +\d+\.\d{6} +\d+\.\d{2} +\d\.\d{4} +\d+\.\d{6} +\d+\.\d{6}$|^Test of homogeneity of ORs \(approx\)|^ +Pr>chi2   = |^ +r\(chi2_hom\) = |^ +109 +0\.8932 +0\.03|^ +r\(se\) = +\.03|^ +chi2\(1\) = +2\.[01]\d +Prob>chi2|^ +r\((chi2|p)\) = +(2\.[01]|\.14)|^ +e\(rngstate\) : /) tolerance(2e-6) exact odds-ratio limits (4th digit, undocumented stopping rule); the interval of the cc standardized odds ratio, the limits and the homogeneity test of mhodds by() (undocumented methods); Hanley's standard error (see 1402); the binormal roccomp chi2 (2.09 vs 2.12, undocumented covariance); rocreg bootstrap draws and e(rngstate) come from OpenDTA's generator; a few rocreg coefficients differ in the 7th digit
1801_programming      ignore(/__0{5}[0-9A-F]|^\d+:\d+:\d+:\d+$/) fvrevar names its temporary variables by an undocumented rule (for i(2,3)bn.rep78 it makes a new one for level 2 although 2.rep78 already exists), which shifts the names of the temporary variables and names made afterwards; the checksums of e(datasignature) use an undocumented algorithm (the N:k:... format and everything else match)
1901_survival         ignore(/^Iteration \d+: +log (pseudo)?likelihood = +-(6[2-9]|[78]\d)\.|^ +1 \| +20 +4\.5 +[0-9.]+ +1\.5 +8$|^ +0\.95[78] +0\.02 +0\.8957 |^chi2\( 2 \) = \.0825|^ +e\((theta|ic|p_c|chi2_c)\) =|^ +(\/ln_the|theta) \| +[-0-9.e]+ +[-0-9.e]+ |^Likelihood-ratio test of theta=0: chibar2\(01\) = +(0\.00|[0-9.]+e-0\d) |^ +e\((V_modelbased|ilog|gradient)\) :|^ +x \| +\.(745|27[345])|^ +\/ln_p \| +\.1212|^ +(_cons \| +2\.87|p \| +1\.1288|1\/p \| +\.8858)/) tolerance(3e-5) streg with ggamma and frailty(): Stata's step rule and starting values are undocumented (iteration lines differ; the log likelihoods agree to 7-8 digits) and its standard errors come from numerical derivatives (up to 2e-5 relative in the table, e(ll_0) and the header); at the theta = 0 boundary of the two shared-frailty fits the likelihood is flat and the displayed coefficients (1e-5 to 1e-2), /ln_the, theta, e(theta), e(ic), e(p_c), e(chi2_c) and the likelihood-ratio test of theta=0 (0.00 in Stata, 1e-7 to 1e-6 here) depend on where the iterations stop. stci, p(25): the boundary rule of the percentile standard error is undocumented (one of eight rows); stmc: Stata's treatment of tied failure times in the Mantel-Cox estimate is undocumented (RR 0.957 vs 0.958; chi2 and P match); ltable, test: Stata seems to compute the likelihood-ratio statistic in single precision (.08251953 vs .08251473); e(V_modelbased), e(ilog) and e(gradient) are not stored
1902_multilevel       ignore(/^Iteration +\d+: +log (restricted-)?likelihood|^Grid node|^ +e\((ic|datasignature)\) /) tolerance(0.75) The iteration lines (starting values, step rule), e(ic) and e(datasignature) come from undocumented algorithms of Stata. The numbers differ only in three places: (1) the crossed-effects data of the mixed cases are generated after bysort, whose order of tied observations is arbitrary in Stata (documented), so the residual draws go to other observations and every estimate of that block differs (OpenDTA's likelihood is checked against a dense-matrix computation in tests/test_multilevel*.py); (2) meglm with a gaussian outcome and link(log): the 7-point adaptive quadrature likelihood is not smooth there, Stata's own iterations are not monotone, and the optimizers stop at different points (-1052.5064 in Stata, -1054.2196 here, with the same grid-node likelihood); (3) intmethod(laplace): Stata's standard errors differ by about 1% (numerical derivatives of the approximation)
1903_base_stats ignore(/^ +ln\(-?\w+-k\) \||^ +1 +\| +[-0-9.e]+ +[-0-9.e]+ +[-0-9.e]+ \| +[-0-9.e]+ +[-0-9.e]+$|^ +e\(ic\) = +(3|1[0-9])$|^ +diff \| +-2108\.027 |^ +m \| +20 |^(Bin (width|height|aspect ratio)|Max obs in a bin|Light|Dark|X-center|Y-center|Petal weight) +=|^ +(flower|type|none|light|dark) |^ +74 +74$|^-{66}$/) tolerance(5e-5) ml, mlexp, ologit, oprobit: Stata's step rule from the first iteration is undocumented (iteration 1-2 lines differ in the 6th-7th digit) and the estimates, standard errors and e(chi2)/e(p) that follow agree to 5 significant digits or better; pwcompare, mcompare(tukey): Stata's studentized-range quantile differs from the exact one in the 7th digit of some limits; lnskew0: Stata stops when |skewness| < zero() (.001) after an undocumented search, so k and its interval differ (here it also gives no interval for price); lv: the pseudosigma of the depth-1 row uses an undocumented tail probability (the other rows match); boxcox: theta and the constant of the lhs-only model differ in the 7th digit (the optimizer stops at a slightly different point) and e(ic) counts the iterations of Stata's search (3) and OpenDTA's (16 or 17, by platform); permute and simulate: the permutations and the random draws come from Stata's undocumented generator use, so c, p and the simulated means differ; sunflower: the bin table uses an undocumented binning rule (only the table is not reproduced; the graph is drawn)
1904_timeseries ignore(/^ +[1-4] +-[0-9.]+ +-(3\.508|2\.592|2\.580) +-[0-9.]+ +-[0-9.]+$|^Iteration [0-9]+:  rho = |^Iteration [0-9]+: +log likelihood = |^ *16[4-6]\. \| |^\|[0-6] +\| +\.[0-9]+ +-?\.[0-9]+ +-?\.[0-9]+ +\|$|\| *-\.0443|^ *1\. \| [0-9.]+e-[0-9]+ \|$|Wald chi2\(1\) += +2\.(62|58)|Log likelihood = -176\.075[35]|^ *var\(ss\)\||Wald chi2\(2\) += +(564\.61|812\.92)|Log likelihood = -(237\.45338 +Prob|244\.51131( +Prob.*)?$)|^ +(frequency|damping|var\(cycle1\)|var\(cy\)) ?\||\| +(\.1867403|\.1896919|\.5595807|\.5803341|\.1066747|\.0976188|\.3820513|\.3953737|\.2209101|\.2490173|\.2956188|\.2644443|\.3476636|\.2987703|\.3421312|\.2149711|\.4251914|\.7027823) |Log likelihood = -3(22\.6141|20\.8137)/) tolerance(0.01) The estimates agree to 4-7 significant digits (the optimizers stop at slightly different points; tolerance(0.01) covers the last digits of the coefficients, standard errors and z). The lines ignored come from undocumented algorithms: dfgls critical values of the 5% and 10% levels and the 1% level without trend (Stata varies them with the number of lags by an undocumented response surface); the iteration log of prais, ssesearch (Stata's search steps) and of svar (Stata's starting values); fcast standard errors from the fourth step on; irf tables with bs (bootstrap draws and, here, every irf table row of three numbers); the skewness of varnorm in the 5th digit; the zero-frequency periodogram (rounding noise around 1e-30); arch with ARCH-M (Stata stops 2e-4 earlier in the likelihood); ucm seasonal (Stata gives no standard error to a variance at zero); ucm cycle (the reference likelihood at its own estimates equals that of an AR(2) with the same parameters, which a cycle with independent shocks does not reproduce, so the estimates and the Wald line differ); mgarch dcc (the reference stops at another point of a flat likelihood: -322.61 against -320.81, and the estimates of the adjustment parameters differ)
1905_panel            skip(/xtunitroot (llc|ips)\b|xtfrontier ly x1 x2, tvd/) ignore(/^\s*\/sigma_[ue]\s+\||^Iteration \d+: +(log likelihood|tolerance)|^\s*/sigma_u\s+\|\s+\.6509531\s+\.0781432\s+8\.33\s+0\.000\s+\.4977951\s+\.804111$|^\s*/sigma_e\s+\|\s+\.9824802\s+\.0367688\s+26\.72\s+0\.000\s+\.9104146\s+1\.054546$|^\s*/sigma_u\s+\|\s+\.6509531\s+\.0781431\s+8\.33\s+0\.000\s+\.4977954\s+\.8041107$|^\s*/sigma_e\s+\|\s+\.9824802\s+\.0367609\s+26\.73\s+0\.000\s+\.9104301\s+1\.05453$|^\s*Wald\s+chi2\(2\)\s+=\s+40\.12$|^\s*Wald\s+chi2\(2\)\s+=\s+5784\.73$|^\s*x1\s+\|\s+\.5299352\s+\.1058424\s+5\.01\s+0\.000\s+\.3224879\s+\.7373825$|^\s*x2\s+\|\s+\.2933818\s+\.1154016\s+2\.54\s+0\.011\s+\.0671988\s+\.5195649$|^\s*_cons\s+\|\s+1\.666355\s+\.17959\s+9\.28\s+0\.000\s+1\.314365\s+2\.018345$|^\s*x1\s+\|\s+\.5450416\s+\.0130661\s+41\.71\s+0\.000\s+\.5194325\s+\.5706507$|^\s*x2\s+\|\s+\.6182502\s+\.0084086\s+73\.53\s+0\.000\s+\.6017697\s+\.6347307$|^\s*_cons\s+\|\s+1\.397814\s+\.0136181\s+102\.64\s+0\.000\s+1\.371123\s+1\.424505$|^\s*Wald\s+chi2\(2\)\s+=\s+207\.03$|^\s*Wald\s+chi2\(2\)\s+=\s+194\.33$|^\s*x1\s+\|\s+\.4932154\s+\.045602\s+10\.82\s+0\.000\s+\.4038372\s+\.5825936$|^\s*x2\s+\|\s+\.4014399\s+\.039636\s+10\.13\s+0\.000\s+\.3237548\s+\.479125$|^\s*_cons\s+\|\s+1\.386411\s+\.0605969\s+22\.88\s+0\.000\s+1\.267643\s+1\.505178$|^\s*x1\s+\|\s+\.5023325\s+\.0429199\s+11\.70\s+0\.000\s+\.4182111\s+\.5864538$|^\s*x2\s+\|\s+\.319006\s+\.0385395\s+8\.28\s+0\.000\s+\.2434699\s+\.3945421$|^\s*_cons\s+\|\s+1\.163874\s+\.0626331\s+18\.58\s+0\.000\s+1\.041115\s+1\.286633$|^\s*within\s+=\s+0\.2927\s+min\s+=\s+8$|^\s*between\s+=\s+0\.4606\s+avg\s+=\s+8\.0$|^\s*overall\s+=\s+0\.2775\s+max\s+=\s+8$|^\s*Wald\s+chi2\(3\)\s+=\s+187\.55$|^\s*within\s+=\s+0\.2925\s+min\s+=\s+8$|^\s*between\s+=\s+0\.4627\s+avg\s+=\s+8\.0$|^\s*overall\s+=\s+0\.2781\s+max\s+=\s+8$|^\s*Wald\s+chi2\(3\)\s+=\s+305\.82$|^\s*x1\s+\|\s+\.536982\s+\.0469325\s+11\.44\s+0\.000\s+\.4449959\s+\.6289681$|^\s*x2\s+\|\s+\.3323699\s+\.0416033\s+7\.99\s+0\.000\s+\.2508289\s+\.4139109$|^\s*_cons\s+\|\s+1\.424628\s+\.121261\s+11\.75\s+0\.000\s+1\.18696\s+1\.662295$|^\s*x1\s+\|\s+\.5360756\s+\.0485549\s+11\.04\s+0\.000\s+\.4409097\s+\.6312414$|^\s*x2\s+\|\s+\.3338526\s+\.0429809\s+7\.77\s+0\.000\s+\.2496116\s+\.4180936$|^\s*_cons\s+\|\s+1\.422708\s+\.1262449\s+11\.27\s+0\.000\s+1\.175273\s+1\.670144$|^\s*sigma_u\s+\|\s+\.78687936$|^\s*sigma_e\s+\|\s+1\.0531547$|^\s*rho_fov\s+\|\s+\.35825617\s+\(fraction\s+of\s+variance\s+due\s+to\s+u_i\)$|^\s*theta\s+\|\s+\.5933149$|^\s*sigma_u\s+\|\s+\.8931821$|^\s*sigma_e\s+\|\s+1\.0528105$|^\s*rho_fov\s+\|\s+\.418519\s+\(fraction\s+of\s+variance\s+due\s+to\s+u_i\)$|^\s*theta\s+\|\s+\.59360156$|^\s*F\s+test\s+that\s+all\s+u_i=0:\s+F\(59,418\)\s+=\s+6\.42\s+Prob\s+>\s+F\s+=\s+0\.0000$|^\s*F\s+test\s+that\s+all\s+u_i=0:\s+F\(59,418\)\s+=\s+10\.44\s+Prob\s+>\s+F\s+=\s+0\.0000$|^\s*between\s+=\s+0\.3648\s+avg\s+=\s+7\.0$|^\s*between\s+=\s+0\.5057\s+avg\s+=\s+7\.0$|^\s*Wald\s+chi2\(2\)\s+=\s+1609\.67$|^\s*Log\s+likelihood\s+=\s+\-163\.92777\s+Prob\s+>\s+chi2\s+=\s+0\.0000$|^\s*Wald\s+chi2\(2\)\s+=\s+1610\.53$|^\s*Log\s+likelihood\s+=\s+\-163\.93811\s+Prob\s+>\s+chi2\s+=\s+0\.0000$|^\s*x1\s+\|\s+\.5129317\s+\.0151468\s+33\.86\s+0\.000\s+\.4832445\s+\.5426189$|^\s*x2\s+\|\s+\.289417\s+\.0122257\s+23\.67\s+0\.000\s+\.2654552\s+\.3133789$|^\s*_cons\s+\|\s+\.8121989\s+1\.054096\s+0\.77\s+0\.441\s+\-1\.253792\s+2\.87819$|^\s*x1\s+\|\s+\.513003\s+\.0151398\s+33\.88\s+0\.000\s+\.4833296\s+\.5426765$|^\s*x2\s+\|\s+\.2894012\s+\.0122269\s+23\.67\s+0\.000\s+\.2654369\s+\.3133655$|^\s*_cons\s+\|\s+\.7678093\s+\.0464014\s+16\.55\s+0\.000\s+\.6768643\s+\.8587544$|^\s*/mu\s+\|\s+\.0435415\s+1\.048403\s+0\.04\s+0\.967\s+\-2\.01129\s+2\.098373$|^\s*/eta\s+\|\s+\.0276457\s+\.6045249\s+0\.05\s+0\.964\s+\-1\.157201\s+1\.212493$|^\s*/lnsigma2\s+\|\s+\-2\.154844\s+\.0645498\s+\-33\.38\s+0\.000\s+\-2\.281359\s+\-2\.028329$|^\s*/ilgtgamma\s+\|\s+\-14\.78745\s+672\.5748\s+\-0\.02\s+0\.982\s+\-1333\.01\s+1303\.435$|^\s*/mu\s+\|\s+\-2\.449364\s+26\.8647\s+\-55\.1032\s+50\.20447$|^\s*/eta\s+\|\s+\.1833591\s+2\.008712\s+\-3\.753644\s+4\.120362$|^\s*/lnsigma2\s+\|\s+\-2\.1178\s+\.7278182\s+\-3\.544298\s+\-\.6913028$|^\s*/ilgtgamma\s+\|\s+\-3\.274853\s+19\.95574\s+\-42\.38739\s+35\.83768$|^\s*sigma2\s+\|\s+\.1159212\s+\.0074827\s+\.1021453\s+\.1315552$|^\s*gamma\s+\|\s+3\.78e\-07\s+\.0002545\s+\.\s+1$|^\s*sigma_u2\s+\|\s+4\.39e\-08\s+\.0000295\s+\-\.0000578\s+\.0000579$|^\s*sigma_v2\s+\|\s+\.1159212\s+\.0074828\s+\.1012552\s+\.1305872$|^\s*sigma2\s+\|\s+\.120296\s+\.0875536\s+\-\.0513059\s+\.2918978$|^\s*gamma\s+\|\s+\.036444\s+\.7007633\s+\-1\.337027\s+1\.409915$|^\s*sigma_u2\s+\|\s+\.0043841\s+\.0874777\s+\-\.167069\s+\.1758372$|^\s*sigma_v2\s+\|\s+\.1159119\s+\.0074895\s+\.1012327\s+\.1305911$|^\s*lambda\s+\-0\.0828\s+0\.4670$|^\s*lambda\s+0\.3583\s+0\.6399$|^\s*lambda\s+\-5\.1038\s+0\.0000$|^\s*lambda\s+\-5\.6075\s+0\.0000$/) tolerance(3e-5) undocumented algorithms: Stata's iteration paths of the numerical maximizers and of igls (Iteration lines, ignored), the numerical Hessian of xtintreg, the generalized inverse of xtgls with correlated panels (T < G), the starting point of igls with psar1, the variance components of xtregar, re, the F test of u_i in xtivreg, fe, the between R-sq of xtivreg, fd, the tvd frontier (flat likelihood at gamma = 0, which also varies between Linux, macOS and Windows; its block is skipped) and the Breitung statistic; xtunitroot llc and ips are not implemented (their blocks are skipped). Layouts, coefficients, standard errors and e() of the other commands match; last-digit noise up to 3e-5
1906_multivariate  ignore(/^Iteration \d+: |^ +e\(rngstate\) : /) tolerance(2e-4) The iteration lines of factor, ml, discrim logistic (mlogit) and mds, method(modern) come from Stata's undocumented optimizer steps and stopping rule: Stata's factor, ml stops after 4 iterations about 1e-7 (log likelihood) away from the maximum that OpenDTA reaches, so the maximum-likelihood loadings and uniquenesses differ in the 4th decimal (up to 1e-4), the later digits of e(ll), e(aic), e(bic), e(chi2_1), e(evsum) and e(r_fmin), and the factor-based tables that follow (estat structure, rotate, promax, oblimin, predict scores; the Variance column of the table in the 5th-6th digit); e(rngstate) is not stored. Everything else in the case matches, including the layout of every command
1907_models         ignore(/^Iteration [0-9]+:/) tolerance(1e-5) skip(/binreg yb x1 x2, hr|scobit|zinb|tnbreg|gnbreg|glogit|ivregress liml yiv x1 \(w2 = z1 z2\), vce\(robust\)|ivpoisson cfunction/) Stata's iteration paths and starting values (Iteration lines, ignored) and the stopping point of each optimizer (tolerance 1e-5: the IRLS of binreg stops earlier, so Pearson differs in the 6th digit). Blocks skipped: binreg, hr (on these data Stata's IRLS does not converge, 16,000 iterations, while OpenDTA does); scobit, zinb, tnbreg and gnbreg (the generated counts and outcome put alpha at the boundary of the parameter space, a flat likelihood where the reported estimates, standard errors and ll0 of gnbreg depend on the optimizer's path); glogit (the grouped counts differ from Stata's, the origin was not isolated, so the weighted regression runs on other data); ivregress liml with vce(robust) (Stata's robust variance of the k-class estimator differs from the sandwich with X-tilde in the 4th digit of the w2 standard error, formula undocumented); ivpoisson cfunction (point estimates match; Stata's standard errors differ in the 3rd digit, formula undocumented). Layouts and numbers of the other commands match
1908_models2      skip(/rreg y5 x1 x2|asmprobit choice|mprobit yy x1 x2/) ignore(/^Iteration \d+: |^Refining estimates|^ *(Huber|Biweight) iteration \d+:|^(Enumerating sample-space|Estimating: )|^ *observation \d+: +enumerations|^ +lambda \| +(2\.112756|\.8218457) |^ +\(1 vs 0\)  \| +(2\.256274|2\.370635|2\.479078|1\.466242|1\.484991) |^ +0  \| +1\.0(55619|44368) |Wald chi2\(3\) += +(2714\.94|4067\.61)$/) tolerance(2e-5) Stata's iteration logs (starting values, step rules, enumeration and isure tolerance definitions) are undocumented and are ignored. Blocks skipped: rreg (the Huber scale and the rule that switches to biweight are undocumented: the first Huber difference is .7680 in Stata and .7697 here, so the weights, F and the table differ), asmprobit and mprobit (simulated likelihoods: Stata's draws and optimizer path are undocumented; the estimates differ from the 5th digit or more). Lines ignored: the standard error of lambda in frontier (Stata's .0771 is not the delta-method value .4011 from the log-variances), the matching estimators' Abadie-Imbens standard errors and the eteffects estimates (undocumented variance and estimator details), and the Wald chi2 of etregress twostep (undocumented). The other numbers agree to 6 significant digits or better (tolerance 2e-5 covers the last digit)
1909_other_suites  skip(/^\. capture noisily (bayes|estat residuals, standardized|estat ginvariant|svy: scobit|svy: fracreg|svy: mprobit|irt 3pl|gsem \(L -> b1|sem \(F -> x1 x2 x3 y1\), group\(grp\) ginvariant\(none\))/) ignore(/^Iteration \d+:|at iteration|last mi update|^ +var\(M1\[id\]\)\| +\.54780(15|06) |^ *e\(\w+\) [:=] /) tolerance(2e-5) Iteration logs are ignored (Stata's starting values and step rules are undocumented), and so are the lines of ereturn list: e(b) and e(k) of sem, gsem and irt leave out the constrained parameters that Stata keeps (Stata's e(b) has the fixed loadings, e(Cns) the constraints), svy: posts only the design results and not the e() of the estimator, and bayesmh does not store Stata 14's sampler internals (adaptation settings, rngstate, temporary file). Blocks skipped: bayesmh, bayesstats and bayestest (OpenDTA's draws do not reproduce Stata's generator) and the bayes prefix (it came in Stata 15: Stata 14 answers "command bayes is unrecognized"); estat residuals, standardized (Stata divides residuals of about 1e-8 by near-zero standard errors, so its diagonal shows noise such as 0.004); estat ginvariant (the score tests agree to 3 digits; the information matrix Stata uses is not documented); sem with ginvariant(none), which Stata leaves unidentified (latent mean and all intercepts free in group 2) and reports convergence not achieved, while OpenDTA fixes the latent mean; svy: scobit, where Stata's variance is singular because alpha goes to the boundary; svy: fracreg, whose linearized standard errors in Stata 14 are about 6 times smaller than the linearized variance of fracreg's scores (.0019 against .0124 for x) by an undocumented formula; svy: mprobit (simulated likelihood, as in case 1908); irt 3pl and the gsem binary factor model, whose likelihoods are flat in the guessing parameter and in the loadings, so the estimates agree to 4 or 5 digits and the standard errors to 3. Line ignored: the standard error of var(M1[id]) in the gsem random-intercept logit (.214577 against .2145605: Stata's adaptive quadrature at its stopping point). The other numbers agree to 5 significant digits or better
1912_epidemiology     ignore(/\((N|P|BC)\)$|e\(rngstate\)|^ +Number of obs += +(400|\.)$/) the bootstrap replicates use OpenDTA's cluster resampling (the draw order of Stata's bsample is undocumented, as in case 0803), so the bias, standard errors and intervals differ; e(rngstate) starts with "XAA" in Stata and with the 3-digit position of the generator here (the Mersenne Twister state that follows is the same); the header of rocreg, probit ml takes the number of observations of the results already in memory, and in the generating Stata session the first call found an N of 400 left by another run. The estimates, standard errors and layout match
1913_base_stats       ignore(/^ +1 +\| .*\|.*\d$|e\(w(var|exp)\) : "(= )?__\d+"|r\(icc_\w+_p\) =/) tolerance(5e-7) the methods gf0 and lf0 take numerical derivatives, whose step Stata does not document: iteration 1 of gf0 differs in the 6th digit, one coefficient shows -.715825 for -.7158249 and e(chi2) of lf0 differs in the 8th digit (as the design F of ml, svy, whose lf1 Hessian is numerical); lv's pseudosigma of the extremes (the row 1) uses a depth Stata does not document, as in case 1903; e(wvar) of ml, svy is a temporary variable whose number depends on the session; icc computes p as 1 - F(x), so a p below 1e-10 is noise of the last bit of F(x). Layout, estimates and the other results match
1914_panel            ignore(/^ +between = 0\.(3303|4802) |r\(p_L\) = |^ z +3\.(8398|7172) /) tolerance(5e-7) the between R-squared of xtivreg, fd follows a rule Stata does not document (none of the group-mean correlations of the levels or of the differences gives its .3303); hadri with the quadratic spectral kernel uses a bandwidth Stata does not document (its z lies between those of bandwidths 2.5 and 3); xtunitroot fisher computes p_L as 1 - F(L), so a p-value near 1e-16 is noise of the last bit; xtdata, re shows the constant .2898498 where the theta of the ratio gives .2898499, a difference in the 7th digit that carries to the regression on the transformed data. Layout, estimates and the other results match
1915_timeseries       skip(/^\. capture noisily (ucm yc, model\(rwalk\) cycle\(1, frequency\(\.4\)\)|predict y[hr]|predict yrs|summarize yh yr yrs|psdensity|summarize (sd|sp) )/) ignore(/^Iteration \d+: +log (pseudo)?likelihood = |^searching for initial values|^\((setting|switching) (technique|optimization) to |^Refining estimates:|e\((ic|technique|tech_steps)\) |e\(ilog\) :|^ +rs2 \| +300 /) tolerance(1e-2) Stata's starting values and optimizer paths are undocumented (arch, arfima, svar, sspace and dfactor use BHHH, BFGS and a refining step), so the iteration logs are ignored and the estimates of the flat likelihoods of arch and arfima differ from the 4th digit; arfima's exact likelihood differs from Stata's by 2.4e-5 at the same point, which moves its robust standard errors by about 0.3%. The ucm model with frequency(.4) does not converge in Stata (16,000 iterations at a log likelihood of -526.06, with var(level) going to zero), while OpenDTA reaches -522.88: that fit and the predictions and spectral densities computed from it are not compared. The standardized residuals of the second equation of dfactor (the innovations standardized by the Cholesky factor of their covariance) have Stata's minimum and maximum but not its mean (.0386 against -.0241): Stata's rule is not documented
1916_multilevel       ignore(/^Iteration +\d+: +log (pseudo)?likelihood|^Grid node \d+:|^ +e\(ic\) = | var\(x\)\| |^LR test vs\. Poisson model: chi2\([23]\) = 315\.13|^ +var\(_cons\)\| +\.25064(28|69) |^ +_cons \| +\.5077[01]\d* +\.072\d+ +-4\.7[35] /) tolerance(3e-3) Stata's starting values (the fixed-effects fit and the grid) and its stopping rule are undocumented: the iteration lines differ, the log likelihoods agree and the estimates differ in the last digits. With nested levels Stata adapts the points of the lower level to each point of the level above, in a way the manual does not give (OpenDTA moves them by the regression of the posterior, exact for a Gaussian model): the standard errors of the count and survival models differ by up to 0.25%. The robust standard error of the constant of mestreg, distribution(exponential) is one of them, and its z moves from -4.75 to -4.73. In mepoisson yc x || s: x || c: the variance of the random slope goes to zero: Stata stops at 1.37e-36 and leaves it out of the degrees of freedom of the LR test, OpenDTA stops at about 2e-8, which changes the standard error of the other variance of the level
1917_multivariate  ignore(/^Iteration \d+: +stress = /) mdslong, method(modern): Stata's optimizer for the stress criterion is undocumented (its iteration log takes 71 steps from the classical start, OpenDTA's majorization several hundred, from about the same first value, to a slightly lower stress); the output after the log matches
1918_models3       ignore(/^Iteration \d+: |^ +e\((ic|delta)\) = |^ +_cons \| +\.98485[68]/) tolerance(3e-4) skip(/, ul\(|predict n1$|summarize n1$|^\. capture noisily ereturn list$|dispersion\(constant\)|^\. glogit|frontier yf x, (uhet|vhet)/) Stata's iteration paths and starting values are undocumented (Iteration lines, ignored; the estimates agree to 5 significant digits or better: heckman and truncreg with offset() stop in the 7th digit, frontier with cm() in the 5th, and its standard errors come from a numerical Hessian that moves by up to 1.4e-4 between Linux and macOS, hence tolerance 3e-4, which moves the z of its _cons from 6.28 to 6.27, a line ignored). Blocks skipped: ul() of tpoisson and tnbreg, which came after Stata 14 (Stata 14 answers "option ul() not allowed", so the predict, summarize and ereturn list that follow refer to other models); tnbreg and nbreg with dispersion(constant), where delta goes to the boundary of the parameter space and the reported ln delta, its standard error and the stopping point depend on the optimizer's path (the layout, ll_0 and the coefficients match; e(ic) and e(delta) of the ereturn list are ignored); glogit, which runs on 72 of the 80 groups in Stata by a rule not isolated (as in case 1907); frontier with uhet() and vhet(), whose standard errors in Stata are up to 1.3% larger than the observed-information ones at the same estimates (the derivatives Stata uses are undocumented; layout and estimates match)
1919_other_suites2   ignore(/^ +r\((deltax|function)\) = +|^ +r\(init\) = +(129\.76\d+|6)$|^ +r\(power\) = +\.9999999880066|^ +r\(beta\) = +1\.1993317|^ +power = +0\.998[67]$|^matrices:$|^ +r\((E0|Ea|Pr)_vec\) : /) power: r(deltax) and r(function) report the steps of Stata's root finder, which is undocumented (r(iter) is always 3 in the log and is written as 3; r(init) matches for cmh, mcc and trend, where it is the root of the tail in the direction of the effect, but the starting value of the F-test sample size of twoway, 129.762 against the root 129.686, follows a rule the manual does not give); repeated, covmatrix(): the multiplier m of Muller and Barton (1989) is not documented, and scaling the noncentrality by epsilon gives power .99866 where Stata prints .9986 (spherical cases match to the last digit; the beta of a power 1 - 1e-8 differs from the 9th digit by the noncentral F algorithm); exponential: r(E0_vec), r(Ea_vec) and r(Pr_vec) (1x3, 1x3, 1x4) are not defined in the manual and are not stored
