commit 2d56db02d58040e3ab3e0c5ba3ab58928e385a21
Author: Scott Kostyshak <[email protected]>
Date: Sun Aug 31 17:09:55 2025 +0200
ctests: add test file for #13219
Thanks to Michael Creel for his helpful LyX file here:
https://github.com/mcreel/Econometrics
---
.../latex/lyxbugs/13219-label-with-comma.24.lyx | 227 +++++++++++++++++++++
development/autotests/invertedTests | 3 +-
2 files changed, 229 insertions(+), 1 deletion(-)
diff --git a/autotests/export/latex/lyxbugs/13219-label-with-comma.24.lyx
b/autotests/export/latex/lyxbugs/13219-label-with-comma.24.lyx
new file mode 100644
index 0000000000..c5c5197b88
--- /dev/null
+++ b/autotests/export/latex/lyxbugs/13219-label-with-comma.24.lyx
@@ -0,0 +1,227 @@
+#LyX 2.4 created this file. For more info see https://www.lyx.org/
+\lyxformat 620
+\begin_document
+\begin_header
+\save_transient_properties true
+\origin unavailable
+\textclass article
+\use_default_options true
+\maintain_unincluded_children no
+\language english
+\language_package default
+\inputencoding auto-legacy
+\fontencoding auto
+\font_roman "default" "default"
+\font_sans "default" "default"
+\font_typewriter "default" "default"
+\font_math "auto" "auto"
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_roman_osf false
+\font_sans_osf false
+\font_typewriter_osf false
+\font_sf_scale 100 100
+\font_tt_scale 100 100
+\use_microtype false
+\use_dash_ligatures true
+\graphics default
+\default_output_format default
+\output_sync 1
+\bibtex_command default
+\index_command default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry false
+\use_package amsmath 1
+\use_package amssymb 1
+\use_package cancel 1
+\use_package esint 1
+\use_package mathdots 1
+\use_package mathtools 1
+\use_package mhchem 1
+\use_package stackrel 1
+\use_package stmaryrd 1
+\use_package undertilde 1
+\cite_engine basic
+\cite_engine_type default
+\biblio_style plain
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\justification true
+\use_refstyle 1
+\use_formatted_ref 0
+\use_minted 0
+\use_lineno 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\is_math_indent 0
+\math_numbering_side default
+\quotes_style english
+\dynamic_quotes 0
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tablestyle default
+\tracking_changes false
+\output_changes false
+\change_bars false
+\postpone_fragile_content false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\docbook_table_output 0
+\docbook_mathml_prefix 1
+\end_header
+
+\begin_body
+
+\begin_layout Standard
+The asymptotic normality theorem above says that the GMM estimator using the
optimal weighting matrix is distributed as
+\begin_inset Formula
+\[
+\sqrt{n}\left(\hat{\theta}-\theta_{0}\right)\stackrel{d}{\rightarrow}N(0,V_{\infty})
+\]
+
+\end_inset
+
+ where
+\begin_inset Formula
+\begin{equation}
+V_{\infty}=\lim_{n\rightarrow\infty}\left(\left(\frac{H_{n}Z_{n}}{n}\right)\left(\frac{Z^{\prime}_{n}\Phi_{n}Z_{n}}{n}\right)^{-1}\left(\frac{Z^{\prime}_{n}H^{\prime}_{n}}{n}\right)\right)^{-1}.\label{var-covcondmoments,nonoptimal}
+\end{equation}
+
+\end_inset
+
+Using an argument similar to that used to prove that
+\begin_inset Formula $\Omega^{-1}_{\infty}$
+\end_inset
+
+ is the efficient weighting matrix,
+ we can show that putting
+\begin_inset Formula
+\[
+Z_{n}=\Phi^{-1}_{n}H^{\prime}_{n}
+\]
+
+\end_inset
+
+ causes the above var-cov matrix to simplify to
+\begin_inset Formula
+\begin{equation}
+V_{\infty}=\lim_{n\rightarrow\infty}\left(\frac{H_{n}\Phi^{-1}_{n}H^{\prime}_{n}}{n}\right)^{-1}.\label{simplevarcov,condmoments}
+\end{equation}
+
+\end_inset
+
+ and furthermore,
+ this matrix is smaller that the limiting var-cov for any other choice of
instrumental variables.
+ (To prove this,
+ examine the difference of the inverses of the var-cov matrices with the
optimal intruments and with non-optimal instruments.
+ As above,
+ you can show that the difference is positive semi-definite).
+\end_layout
+
+\begin_layout Itemize
+Note that both
+\begin_inset Formula $H_{n},$
+\end_inset
+
+ which we should write more properly as
+\begin_inset Formula $H_{n}(\theta_{0}),$
+\end_inset
+
+ since it depends on
+\begin_inset Formula $\theta_{0},$
+\end_inset
+
+ and
+\begin_inset Formula $\Phi$
+\end_inset
+
+ must be consistently estimated to apply this.
+\end_layout
+
+\begin_layout Itemize
+Usually,
+ estimation of
+\begin_inset Formula $H_{n}$
+\end_inset
+
+ is straightforward - one just uses
+\begin_inset Formula
+\[
+\widehat{H}=\frac{\partial}{\partial\theta}h^{\prime}_{n}\left(\tilde{\theta}\right),
+\]
+
+\end_inset
+
+ where
+\begin_inset Formula $\tilde{\theta}$
+\end_inset
+
+ is some initial consistent estimator based on non-optimal instruments.
+\end_layout
+
+\begin_layout Itemize
+Estimation of
+\begin_inset Formula $\Phi_{n}$
+\end_inset
+
+ may not be possible.
+ It is an
+\begin_inset Formula $n\times n$
+\end_inset
+
+ matrix,
+ so it has more unique elements than
+\begin_inset Formula $n,$
+\end_inset
+
+ the sample size,
+ so without restrictions on the parameters it can't be estimated consistently.
+ Basically,
+ you need to provide a parametric specification of the covariances of the
+\begin_inset Formula $h_{t}(\theta)\;$
+\end_inset
+
+in order to be able to use optimal instruments.
+ A solution is to approximate this matrix parametrically to define the
instruments.
+ Note that the simplified var-cov matrix in equation
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "simplevarcov,condmoments"
+nolink "false"
+
+\end_inset
+
+ will not apply if approximately optimal instruments are used - it will be
necessary to use an estimator based upon equation
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "var-covcondmoments,nonoptimal"
+nolink "false"
+
+\end_inset
+
+,
+ where the term
+\begin_inset Formula $n^{-1}Z^{\prime}_{n}\Phi_{n}Z_{n}$
+\end_inset
+
+ must be estimated consistently apart,
+ for example by the Newey-West procedure.
+
+\end_layout
+
+\end_body
+\end_document
diff --git a/development/autotests/invertedTests
b/development/autotests/invertedTests
index 65c8022493..9ba754fa1c 100644
--- a/development/autotests/invertedTests
+++ b/development/autotests/invertedTests
@@ -100,9 +100,10 @@ export/.*/fa/Welcome_(dvi3|pdf5)_systemF
export/export/latex/languages/nested-inputenc_auto-legacy_pdf2
-# - This test is usually inverted, but it works with the DocBook backend.
+# - These tests are usually inverted, but they work with the DocBook backend.
!export/export/latex/lyxbugs/3059-language-in-tables_docbook5
!export/export/latex/lyxbugs/12708-refstyle-amsmath_docbook5
+!export/export/latex/lyxbugs/13219-label-with-comma.24_docbook5
# ================================================
Sublabel: lyxbugs
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs