The following changes are sufficient for compilation but the result is not at all ideal. The initial fix involves:
- using
S
and S[<options>]
in place of the appropriate c c
columns;
- adding an option to the package for backwards compatibility so that the specific options chosen work.
That is:
\begin{tabular}{l S S[tabnumalign=center,tabformat=3.2] c c}\hline\hline
and
\usepackage[version-1-compatibility]{siunitx}

As it is, the table is too wide for the page. Moreover, as booktabs' manual explains, the default configuration does not create professional-looking tables. For that, you need to follow some general guidelines and use some enhanced versions of LaTeX's commands and environments. Typically, this would mean more vertical space, rules of variable widths rather than squished doubling of monowidth rules etc. It would be good if we could also use the updated syntax for siunitx and avoid the need for explicit formatting in the caption specification.
First, we can remove
\captionsetup{labelfont=bf}
since this just repeats the argument passed to the package. Second, we can add
font=bf
to make the content of the caption bold as well, avoiding the need for explicit markup.
So we'll have
\usepackage[labelfont=bf,font=bf]{caption}
and then
\caption{Summary statistics \label{A2}}
Let's also load booktabs
\usepackage{booktabs}
and see if its rules can improve the appearance of the table.
\toprule
specifies a heavier rule intended for use at the top and likewise
\bottomrule
at the bottom.
\midrule
should separate our column headers from the main body of the table.
So now we have
\begin{table}
\centering
\caption{Summary statistics \label{A2}}
\begin{tabular}{l S S[table-number-alignment=center,table-format=3.2] c c}
\toprule
\multicolumn{1}{l}{\textbf{Variable}} & \textbf{Mean} & \textbf{Std. Dev.}& \textbf{Min.} & \textbf{Max.} \\
\midrule
...
\bottomrule
\end{tabular}
\end{table}
Personally, I would also remove the additional vertical spacing. If you really want it, I'd use something like \\[\smallskipamount]
or \\[2\smallskipamount]
but it is important to maintain consistency: it should be clear to your reader what a difference in formatting indicates.
The final line of the table looks very strange. I'd recommend putting this information in the caption instead or, if your table will include notes, you could include it there.
For the third column of the table, we currently have
S[tabnumalign=center,tabformat=3.2]
Let's start by updating to the new syntax so we can jettison backwards-compatibility mode:
S[table-number-alignment=center,table-format=3.2]
This isn't quite right, though. Our column has at most a two-digit integer and at most three decimal places, but we've requested space for a three-digit integer with at most two decimal places, so we need to change it
S[table-number-alignment=center,table-format=2.3]
In fact, we should probably use the same settings for the previous S
column as well, replacing
S S[table-number-alignment=center,table-format=2.3]
with
*{2}{S[table-number-alignment=center,table-format=2.3]}
We also need more room in the page. The easiest way to do this is to use geometry to let us use a larger proportion of the paper for the text block. We don't need much more but
\usepackage[scale=.75]{geometry}
will do the trick.
The result of the above changes looks like this

Complete code:
\documentclass{article}
\usepackage[scale=.75]{geometry}
\newcommand*{\MyIndent}{\hspace*{1.5cm}}
\usepackage{siunitx,booktabs}
\usepackage[labelfont=bf,font=bf]{caption}
\begin{document}
\begin{table}
\centering
\caption{Summary statistics (N=98673) \label{A2}}
\begin{tabular}{l *{2}{S[table-number-alignment=center,table-format=2.3]} c c}
\toprule
\multicolumn{1}{l}{\textbf{Variable}} & \textbf{Mean} & \textbf{Std. Dev.}& \textbf{Min.} & \textbf{Max.} \\
\midrule
Individual preferences for redistribution (IPR) & 0.132 & 0.339 & 0 & 1 \\
Subjective Freedom (SF) & 7.030 & 2.262 & 1 & 10 \\
Fairness (Hard work) & 0.239 & 0.426 & 0 & 1 \\
Gender & 0.513 & 0.5 & 0 & 1 \\
Age & 41.199 & 15.829 & 18 & 99 \\
Self-reported income & 4.907 & 2.312 & 1 & 10 \\
Low education & 0.27 & 0.444 & 0 & 1 \\
High education & 0.275 & 0.446 & 0 & 1 \\
Single & 0.24 & 0.427 & 0 & 1 \\
Married & 0.564 & 0.496 & 0 & 1 \\
No children & 0.285 & 0.451 & 0 & 1 \\
Size of town & 4.855 & 2.485 & 1 & 8 \\
Household income satisfaction & 5.791 & 2.515 & 1 & 10 \\
Chief wage earner & 0.495 & 0.5 & 0 & 1 \\
Health status & 3.87 & 0.87 & 1 & 5 \\
Religious service attendance & & & & \\
\MyIndent More than once a week & 0.148 & 0.355 & 0 & 1 \\
\MyIndent Once a week & 0.187 & 0.39 & 0 & 1 \\
\MyIndent Once a month & 0.114 & 0.318 & 0 & 1 \\
\MyIndent Only on special holy days & 0.165 & 0.371 & 0 & 1 \\
\MyIndent Other specific holy days & 0.002 & 0.041 & 0 & 1 \\
\MyIndent Once a year & 0.062 & 0.241 & 0 & 1 \\
\MyIndent Less often & 0.11 & 0.313 & 0 & 1 \\
Religious affiliation & & & & \\
\MyIndent Catholics & 0.242 & 0.428 & 0 & 1 \\
\MyIndent Muslim & 0.135 & 0.342 & 0 & 1 \\
\MyIndent Protestant & 0.112 & 0.315 & 0 & 1 \\
\MyIndent Orthodox & 0.144 & 0.351 & 0 & 1 \\
Type of job & & & & \\
\MyIndent Manager & 0.042 & 0.2 & 0 & 1 \\
\MyIndent Non-manual & 0.048 & 0.213 & 0 & 1 \\
\MyIndent Manual & 0.17 & 0.376 & 0 & 1 \\
\MyIndent Full-time & 0.377 & 0.485 & 0 & 1 \\
\MyIndent Self-employed & 0.13 & 0.336 & 0 & 1 \\
\MyIndent Retired & 0.125 & 0.33 & 0 & 1 \\
\MyIndent Unemployed & 0.09 & 0.286 & 0 & 1 \\
\bottomrule
\end{tabular}
\end{table}
\end{document}
S
within the column specification you pass totabular
. Don't add an additional specification as the environment does not expect one.{S[S[tabnumalign=center,tabformat=3.2]}
, that's the double specification cfr is referring to, I think.\begin{tabular}{...}{...}
rather than\begin{tabular}{...}
because theS
is being given in addition to the standard column specs rather than replacing them.