STATA Tabelle einfügen mittels estout

Tabellen und Grafiken erstellen und anordnen


genic
Forum-Newbie
Forum-Newbie
Beiträge: 9
Registriert: Fr 3. Aug 2018, 13:20

STATA Tabelle einfügen mittels estout

Beitrag von genic »

Hallo, ich habe folgendes Problem:
Ich kann nämlich keine Tabelle aus STATA in Latex einfügen. Ich habe das estout package installiert und versucht die Tabelle mit dem Befehl estwide einzufügen. Dann kommt aber die Fehlermeldung "Misplaced \noalign. \estwide{table1.tex}{6}{c}" oder "not in outer par mode". Hier ist der Code, und ich habe zusätzlich noch die tex-datei der Tabelle angefügt.
Bin dankbar für jeglich Hilfe.

\documentclass[
fontsize=11pt,
bibliography=totocnumbered,
listof=totocnumbered,
numbers=enddot,
sectionentrydots,
captions=heading,
parskip
]{scrartcl}
\usepackage{blindtext}% nur für Fülltext
\usepackage[margin=2.5cm]{geometry}
\usepackage[onehalfspacing]{setspace} %1.5 Zeilenabstand
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{graphicx} %Graphik einfügen
\usepackage{wrapfig} %Graphik in Text
\usepackage{pgffor}
\usepackage{mathptmx}
\usepackage{booktabs}
\usepackage{lipsum}
\usepackage[style=apa]{biblatex}
\usepackage[thinlines]{easytable}
\usepackage{multirow}
\usepackage{amsmath}
\usepackage[flushleft]{threeparttable}
\usepackage{tabularx}


\bibliography{Literatur.bib}



\def\tablenotes{\vskip2pt\footnotesize} %Def.Table-Notes

% *****************************************************************
% Estout related things
% *****************************************************************
\newcommand{\sym}[1]{\rlap{#1}}% Thanks to David Carlisle

\let\estinput=\input% define a new input command so that we can still flatten the document

\newcommand{\estwide}[3]{
	\vspace{.75ex}{
		\begin{tabular*}
			{\textwidth}{@{\hskip\tabcolsep\extracolsep\fill}l*{#2}{#3}}
			\toprule
			\estinput{#1}
			\bottomrule
			\addlinespace[.75ex]
		\end{tabular*}
	}
}	

\newcommand{\estauto}[3]{
	\vspace{.75ex}{
		\begin{tabular}{l*{#2}{#3}}
			\toprule
			\estinput{#1}
			\bottomrule
			\addlinespace[.75ex]
		\end{tabular}
	}
}

% Allow line breaks with \\ in specialcells
\newcommand{\specialcell}[2][c]{%
	\begin{tabular}[#1]{@{}c@{}}#2\end{tabular}}

% *****************************************************************
% Custom subcaptions
% *****************************************************************
% Note/Source/Text after Tables
\newcommand{\figtext}[1]{
	\vspace{-1.9ex}
	\captionsetup{justification=justified,font=footnotesize}
	\caption*{\hspace{6pt}\hangindent=1.5em #1}
}
\newcommand{\fignote}[1]{\figtext{\emph{Note:~}~#1}}

\newcommand{\figsource}[1]{\figtext{\emph{Source:~}~#1}}

% Add significance note with \starnote
\newcommand{\starnote}{\figtext{* p < 0.1, ** p < 0.05, *** p < 0.01. Standard errors in parentheses.}}

% *****************************************************************
% siunitx
% *****************************************************************
\usepackage{siunitx} % centering in tables
\sisetup{
	detect-mode,
	tight-spacing		= true,
	group-digits		= false ,
	input-signs		= ,
	input-symbols		= ( ) [ ] - + *,
	input-open-uncertainty	= ,
	input-close-uncertainty	= ,
	table-align-text-post	= false
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\begin{document}


\begin{table}
	\caption{Sample Characteristics by the Amount of Co-Holding (\pounds)}
	\estwide{table1.tex}{6}{c}
	\label{table2}
\end{table}


\end{document}
Dateianhänge
table1.tex
(872 Bytes) 253-mal heruntergeladen