[Tex/LaTex] Question marks in a reference to a table

back-referencingcross-referencingtables

I have this code and when I compile (even several times) some question marks appear on the pdf in the place where the reference should be.

Actually if we perform an Augmented Dickey-Fuller test on the in-sample we refuse the null hypothesis of explosive process with a p-value of 0.8226. 
This applies to all the models here presented, AR(1), AR(3) and 
ARMA(1,1). Model coefficients can be inspected in Table 
\ref{tab:daily_model_coefficients}
\medskip

\begin{figure}[H]
    \centering
    \caption{Model coefficients of the Daily Component Models\label{tab:daily_model_coefficients}}
    \begin{tabular}{c|c|c|c|c|c}
    \hline \hline
    $Model$ & \phi_{0} & \phi_{1} & \phi_{2} & \phi_{3} & \theta_{1}\\   
    \hline
    AR(1)   & 6.5397    & 0.8988 &- &- & - \\
    AR(3) & 6.2932  & 0.7257    & -0.0099   & 0.2162 &- \\
    ARMA(1,1) & 6.0340  & 0.9741    & -&    -   & -0.4991 \\
\hline
\end{tabular}
\end{table}

So the point is that when I compile several times I get the following:

Actually if we
perform an Augmented Dickey-Fuller test on the in-sample we refuse the
null hypothesis of explosive process with a p-value of 0.8226. This applies
to all the models here presented, AR(1), AR(3) and ARMA(1,1). Model
coefficients can be inspected in Table
??

I am using Sharelatex now. I will appreciate any suggestion

Best Answer

In order for your references to work properly (on ShareLaTeX), you need to make the document compile without error. You'll note that in your example you started with a figure but ended with a table:

\begin{figure}[H]
  % ...
\end{table}

Also, tabular header row contains math content without you inserting math mode properly.

This is what you need:

enter image description here

\documentclass{article}

\begin{document}

Actually if we perform an Augmented Dickey-Fuller test on the in-sample we
refuse the null hypothesis of explosive process with a p-value of 0.8226. 
This applies to all the models here presented, AR(1), AR(3) and 
ARMA(1,1). Model coefficients can be inspected in Table 
\ref{tab:daily_model_coefficients}.

\begin{table}
  \centering
  \caption{Model coefficients of the Daily Component Models\label{tab:daily_model_coefficients}}
  \begin{tabular}{c|c|c|c|c|c}
    \hline \hline
    Model & $\phi_0$ & $\phi_1$ & $\phi_2$ & $\phi_3$ & $\theta_1$ \\   
    \hline
    AR(1)   & 6.5397    & 0.8988 &- &- & - \\
    AR(3) & 6.2932  & 0.7257    & -0.0099   & 0.2162 &- \\
    ARMA(1,1) & 6.0340  & 0.9741    & -&    -   & -0.4991 \\
    \hline
  \end{tabular}
\end{table}

\end{document}

Consider using booktabs for your tabular representations.

Related Question