Text FormattingCould someone help debug this ?

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
thedreamshaper
Posts: 44
Joined: Wed Aug 04, 2010 7:00 pm

Could someone help debug this ?

Post by thedreamshaper »

I am getting alot of errors from my tabularx usage in my document, im not at all sure about how to really use it and i havent been able to learn how to fix the problems. In short, i hoped you guys could help me out :)


an example of where the erros occur:

Code: Select all

\begin{tabularx}{\linewidth}{|p{3.5cm}|p{9.5cm}|p{3.0cm}|}
\hline
Navn & Tolkning end & Bør være \\
%\midrule
\hline
 &  &   \\
Hatværdi & Observations mulighed for indflydelse pga. ekstrem $X_i$ værdi & $ <\frac{3k}{n}$  \\
 &  &   \\
Standardiserede residualer & Standardiserede fejl vi begår i vores forudsigelse af observationens y værdi & \leq | 2 |  \\
 &  &   \\
DFFITS & Ændringen i de fittede værdier for observation i på baggrund af observationen selv & $ \leq 3 \sqrt{ \frac{k}{n-k} } $  \\
 &  &   \\
DFBETAS & Ændringen i estimatet af $\beta_j$ som følge af observation i & \leq | 1 |  \\
 &  &   \\
COOKS D & Observations indflydelse på hele $ \beta $ vektorens varians & $ F_{k,n-k}(D_i)>0.5 $  \\
 &  &   \\
 VIF & Viser hvor meget variansen på $\beta$ vektoren øges af en forklarende variabel, hvis høj er der multikolinearitet  &  $ VIF \leq 5 $  \\
 &  &   \\
\hline%\bottomrule
\end{tabularx}
It gives alot of: "Missing or forgotten $ or }"
and also: "Missing $ insertet"

But i cant seem to find the error ? :)

Meaby its just late and i am tired..

anyway, thanks a bunch guys :)

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Could someone help debug this ?

Post by frabjous »

Several times you use math commands like \leq outside of math mode.

Code: Select all

Standardiserede residualer & Standardiserede fejl vi begår i vores forudsigelse af observationens y værdi & \leq | 2 |  \\
needs to be:

Code: Select all

Standardiserede residualer & Standardiserede fejl vi begår i vores forudsigelse af observationens y værdi & $\leq | 2 |$  \\
or similar, and the same is true for the two other occurrences of \leq.

Those are the most obvious. I think there may be more problems too.

It would help greatly if you would always post a complete minimal document or minimal working example that could be compiled on its own. This table is rather wide: too wide to fit on a normal page with normal orientation, but we have no clue what page set up you're using, and so on. Having a complete document would help with that.
Post Reply