I was wondering if there was a known issue with combining threeparttable with cross references inside a float. I have my labels inside the table captions, and this works just fine unless threeparttable is called, in which case the references are ?? once it's compiled. Any suggestions would be appreciated.
ETA: Thank you scottkosty, of course I should add more detail. Here is a screenshot of one of the tables in LyX, with the threeparttable command:

And here is the exported tex for that table, including the preamble:
%% LyX 2.0.6 created this file. For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[12pt,british,american,english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{color}
\usepackage{babel}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{setspace}
\onehalfspacing
\usepackage[unicode=true,pdfusetitle,
bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,
breaklinks=false,pdfborder={0 0 0},backref=false,colorlinks=true]
{hyperref}
\usepackage{breakurl}
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
%% Because html converters don't know tabularnewline
\providecommand{\tabularnewline}{\\}
%% A simple dot to overcome graphicx limitations
\newcommand{\lyxdot}{.}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage{amsfonts}
\usepackage{chicago}
\usepackage{pdflscape}
\usepackage{appendix}
\usepackage{hyperref}
\usepackage[letterpaper,top=1in,right=1in,left=1in,bottom=1in]{geometry}
\usepackage[bottom]{footmisc}
%\usepackage{fancyhdr}
\usepackage{bibentry}
\usepackage{threeparttable}
\usepackage{dcolumn}
\usepackage{booktabs}
\setcounter{MaxMatrixCols}{10}
\newtheorem{theorem}{Theorem}
\newtheorem{acknowledgement}[theorem]{Acknowledgement}
\newtheorem{algorithm}[theorem]{Algorithm}
\newtheorem{axiom}[theorem]{Axiom}
\newtheorem{case}[theorem]{Case}
\newtheorem{claim}[theorem]{Claim}
\newtheorem{conclusion}[theorem]{Conclusion}
\newtheorem{condition}[theorem]{Condition}
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{criterion}[theorem]{Criterion}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{exercise}[theorem]{Exercise}
\newtheorem{lemma}{Lemma}
\newtheorem{notation}[theorem]{Notation}
\newtheorem{problem}[theorem]{Problem}
\newtheorem{proposition}{Proposition}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{solution}[theorem]{Solution}
\newtheorem{summary}[theorem]{Summary}
\newenvironment{proof}[1][Proof]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}
% For centered entries:
% Allow line breaks with \\ in specialcells
\newcommand{\specialcell}[2][c]{%
\begin{tabular}[#1]{@{}c@{}}#2\end{tabular}
}
% For left-aligned entries:
%% Allow line breaks with \\ in specialcells
%\newcommand{\specialcell}[2][c]{%
%\begin{tabular}[#1]{@{}l@{}}#2\end{tabular}% missing % in original
% %%%
%}
% *****************************************************************
% siunitx
% *****************************************************************
\newcommand{\sym}[1]{\rlap{#1}} % Thanks to Joseph Wright & David Carlisle
\usepackage{siunitx}
\sisetup{
detect-mode,
group-digits = false,
input-symbols = ( ) [ ] - +,
tight-spacing = true,
table-align-text-post = false,
input-signs = ,
}
% Packages for tables
\usepackage{booktabs}% Pretty tables
\usepackage{threeparttablex}% For Notes below table
% Character substitution that prints brackets and the minus symbol in text mode. Thanks to David Carlisle
\def\yyy{%
\bgroup\uccode`\~\expandafter`\string-%
\uppercase{\egroup\edef~{\noexpand\text{\llap{\textendash}\relax}}}%
\mathcode\expandafter`\string-"8000 }
\def\xxxl#1{%
\bgroup\uccode`\~\expandafter`\string#1%
\uppercase{\egroup\edef~{\noexpand\text{\noexpand\llap{\string#1}}}}%
\mathcode\expandafter`\string#1"8000 }
\def\xxxr#1{%
\bgroup\uccode`\~\expandafter`\string#1%
\uppercase{\egroup\edef~{\noexpand\text{\noexpand\rlap{\string#1}}}}%
\mathcode\expandafter`\string#1"8000 }
\def\textsymbols{\xxxl[\xxxr]\xxxl(\xxxr)\yyy}
% *****************************************************************
% Estout related things
% *****************************************************************
\let\estinput=\input % define a new input command so that we can still flatten the document
\newcommand{\estwide}[3]{
\vspace{.75ex}{
\textsymbols% Note the added command here
\begin{tabular*}
{\textwidth}{@{\hskip\tabcolsep\extracolsep\fill}l*{#2}{#3}}
\toprule
\estinput{#1}
\bottomrule
\addlinespace[.75ex]
\end{tabular*}
}
}
\newcommand{\estauto}[3]{
\vspace{.75ex}{
\textsymbols% Note the added command here
\begin{tabular}{l*{#2}{#3}}
\toprule
\estinput{#1}
\bottomrule
\addlinespace[.75ex]
\end{tabular}
}
}
% *****************************************************************
% Custom subcaptions
% *****************************************************************
% Note/Source/Text after Tables
% The new approach using threeparttables to generate notes that are the exact width of the table.
\newcommand{\Figtext}[1]{%
\begin{tablenotes}[para,flushleft]
\hspace{6pt}
\hangindent=1.75em
#1
\end{tablenotes}
}
\newcommand{\Fignote}[1]{\Figtext{\emph{Note:~}~#1}}
\newcommand{\Figsource}[1]{\Figtext{\emph{Source:~}~#1}}
\newcommand{\Starnote}{\Figtext{* p < 0.1, ** p < 0.05, *** p < 0.01. Standard errors in parentheses.}}% Add significance note with \starnote
% To adjust margins:
\usepackage{changepage}
\usepackage{bbm}
\usepackage{bm}
\makeatother
\begin{document}
\begin{onehalfspace}
\begin{table}[!t]
\centering
\begin{threeparttable}
\caption{\label{tab:indices_plain}Treatment effects on index variables}
{\scriptsize\include{../Output/indices_plain}}
\selectlanguage{british}%
\begin{tablenotes}[flushleft] \scriptsize \item \emph{Notes:}
OLS estimates of treatment and spillover effects. Outcome variables are listed on the left. Column (1) reports the mean of the control group for a given outcome variable. Column (2) reports the treatment effect across villages, i.e. comparing treatment households to pure control households. Column (3) reports the treatment effect within villages, i.e. comparing treatment housholds to control households in treatment villages (spillover households). Column (4) reports the spillover effect, i.e. the treatment effect on spillover households compared to pure control households. The unit of observation is the household for all outcome variables, except the psychological variables index, where it is the individual. The sample includes all households and individuals, except for the intrahousehold index, where it is restricted to co-habitating couples, and for the education index, where it is restricted to households with school-age children. For each outcome variable, we report the coefficient of interest, its standard error in parentheses, and the bootstrapped FWER $p$-value in brackets. Standard errors are clustered at the village level in columns (2) and (4), and at the household level in column (3). * denotes significance at 10 pct., ** at 5 pct., and *** at 1 pct. level.
\end{tablenotes}
\end{threeparttable}\selectlanguage{english}%
\end{table}
\end{document}
Hopefully this helps describe the situation. I'm using LyX version 2.0.6, with the MacTeX package 2013. Thank you all!

indices_plain? When I replace that line with a simpletabular, I get the caption and reference as expected. – Torbjørn T. Jul 31 '13 at 20:06@usernameto make sure people are notified). Just realized that you use Include to add the tabular file: Don't. Include adds a\clearpage, try with Input instead. – Torbjørn T. Aug 03 '13 at 21:03\inputvs.\include: http://tex.stackexchange.com/questions/246/when-should-i-use-input-vs-include – Torbjørn T. Aug 05 '13 at 16:55