\section{The problem}\label{sec1}
Almost all \textit{in-vivo} bioassays in regulatory toxicology use a design where multiple dose (treatment) groups are compared with a concurrent negative control, e.g. selected clinical chemistry endpoints were compared  three dose groups with disodium adenosine-triphosphate with a water control \cite{Jager2020}. Typically, the Dunnett procedure is used \cite{Dunnett1955} and proposed in related guidance's \cite{NTP2012}.
Almost all such \textit{in-vivo} bioassays use both males and females, and evaluate almost all for males and females separately, each at level $\alpha$. The advantage is simplicity. The disadvantage are neither statistical claim for no sex-specificity, nor for particular sex-specific effects and especially the loss of power because considering $N/2$ each if there is no significant sex effect as well as then findings to be interpreted twice.\\
In addition to the separate analysis described above, a stepwise approach can be found in the literature for such treatment-by-sex two-way designs: if the pre-F-test for treatment-by-sex interaction is significant, analysis is performed separately; otherwise pooled over both sexes. This approach is not really suitable for the evaluation of in-vivo assays \cite{Hothorn2020l}.




\section{A motivating data example}

A motivating data example, the relative liver weight data from a 13-week study on F344 rats administered with sodium dichromate dihydrate is used here \cite{NTP}. The boxplot reveals an interaction between males and females and possible weight reduction in males as well as approximate homogeneous variance in symmetric distributed data. I.e. the standard Dunnett-test using the R-package multcomp \cite{Hothorn2008} is recommended.

\begin{figure}[htbp]
	\centering
		\includegraphics[width=0.450\textwidth]{RelLiv.jpeg}
	\caption{Relative liver weights}
	\label{fig:LiverIA}
\end{figure}

The ANOVA analysis reveal clear dose, sex and interaction effects, i.e. a separate analysis for males and females is indicated according to the recent paradigm.

\begin{table}[ht]
\centering\footnotesize
\begin{tabular}{lrrrrr}
  \hline
 & Df & Sum Sq & Mean Sq & F value & Pr($>$F) \\ 
  \hline
	Dose & 5 & 1.07 & 0.21 & 5.68 & 0.0001 \\ 
  Sex & 1 & 1.27 & 1.27 & 33.61 & 0.0000 \\ 
  Dose:Sex & 5 & 0.95 & 0.19 & 4.99 & 0.0004 \\ 
  Residuals & 108 & 4.09 & 0.04 &  &  \\ 
   \hline
\end{tabular}
\caption{Global ANOVA} 
\end{table}

\section{Simultaneous Dunnett-type comparisons in two-way designs}
A pre-test for no interaction is problematic, because first of all it should be an equivalence test, where the definition of the still to be tolerated threshold for an interaction is difficult to practically impossible. And second, neither the error control nor the power of the conditional joint procedure (pre-test, main test) is trivial and satisfactory. Since the inference for the factor dose is primary and the secondary factor has only a few levels (here for sex exactly 2), a simultaneous single-step analysis, considering two Dunnett tests jointly, one for males and the other for females, can be recommended instead of a pre-test procedure \cite{Hothorn2020t}. Here we recommend the further jointly inference of the data pooled over both sexes. This allows the interpretation of both global and sex-specific effects. Due to the high correlation between these three test statistics, the additional price of conservatism, i.e. increase in the false negative rate, is still acceptable compared to the advantages of a consistent interpretation \cite{Hothorn2020l}. This approach requires the computation of the more complex correlation matrix in the package multcomp for a pseudo one-way layout, the so-called cell means model without intercept \cite{Kitsche2015}. Both simultaneous confidence intervals (preferred because of \cite{Hothorn2020} ) and adjusted p-values are then easily available. In the next chapter this approach is illustrated by the data example.


\section{Evaluation of the data example using library(multcomp)}
The formulation of  the cell means model is simple as a one-way layout for the interaction factor $\text{Dose:Sex}$. A related simple linear model is fitted for this interaction factor without intercept. For the function \textit{glht()} in the R-library multcomp, the contrast matrix for the joint test is formulated to (see the R-code in the Appendix):

\scriptsize
\begin{verbatim}
              0 62.5 125 250 500 1000  0 62.5 125 250 500 1000                        
f:62.5 - 0 -1.0  1.0 0.0 0.0 0.0  0.0  0.0 0.0 0.0 0.0 0.0 0.0
f:125 - 0  -1.0  0.0 1.0 0.0 0.0  0.0  0.0 0.0 0.0 0.0 0.0 0.0
f:250 - 0  -1.0  0.0 0.0 1.0 0.0  0.0  0.0 0.0 0.0 0.0 0.0 0.0
f:500 - 0  -1.0  0.0 0.0 0.0 1.0  0.0  0.0 0.0 0.0 0.0 0.0 0.0
f:1000 - 0 -1.0  0.0 0.0 0.0 0.0  1.0  0.0 0.0 0.0 0.0 0.0 0.0
m:62.5 - 0  0.0  0.0 0.0 0.0 0.0  0.0 -1.0 1.0 0.0 0.0 0.0 0.0
m:125 - 0   0.0  0.0 0.0 0.0 0.0  0.0 -1.0 0.0 1.0 0.0 0.0 0.0
m:250 - 0   0.0  0.0 0.0 0.0 0.0  0.0 -1.0 0.0 0.0 1.0 0.0 0.0
m:500 - 0   0.0  0.0 0.0 0.0 0.0  0.0 -1.0 0.0 0.0 0.0 1.0 0.0
m:1000 - 0  0.0  0.0 0.0 0.0 0.0  0.0 -1.0 0.0 0.0 0.0 0.0 1.0
p:62-0     -0.5  0.5 0.0 0.0 0.0  0.0 -0.5 0.5 0.0 0.0 0.0 0.0
p:125-0    -0.5  0.0 0.5 0.0 0.0  0.0 -0.5 0.0 0.5 0.0 0.0 0.0
p:250-0    -0.5  0.0 0.0 0.5 0.0  0.0 -0.5 0.0 0.0 0.5 0.0 0.0
p:500-0    -0.5  0.0 0.0 0.0 0.5  0.0 -0.5 0.0 0.0 0.0 0.5 0.0
p:1000-0   -0.5  0.0 0.0 0.0 0.0  0.5 -0.5 0.0 0.0 0.0 0.0 0.5
\end{verbatim}
\normalsize
Instead of a $(k * (k+1)$ matrix for the one-way layout a $(3k * 2(k+1)$ matrix is used for the cell means model, where the upper parts are for the comparisons with males (m) or females (f) and the lower part for the pooled (p). 

\begin{table}[ht]
\centering\footnotesize
\begin{tabular}{rlr}
  \hline
Type & Comparison & p-value \\ 
  \hline
  Females & 62.5-0 & 0.34 \\ 
  & 125-0 & 0.99 \\ 
  & 250-0 & 0.99 \\ 
  & 500-0 & 0.99 \\ 
  & 1000-0 & 0.99 \\ \hline
  Males & 62.5-0 & 0.91 \\ 
  & 125-0 & 0.87 \\ 
  & 250-0 & 0.91 \\ 
   & 500-0 & 0.0004 $\Downarrow$ \\ 
   & 1000-0 & 0.007 $\Downarrow$ \\ \hline
  Pooled &62.5-0 & 0.23 \\ 
   & 125-0 & 0.98 \\ 
  & 250-0 & 0.99 \\ 
   & 500-0 & 0.005 $\Downarrow$\\ 
   & 1000-0 & 0.25 \\ 
  \hline
\end{tabular}
\caption{Adjusted two-sided p-values for the joint test} 
\end{table}
\normalsize
In this example the global residual $df$ is with  108 large, therefore the $df$-reduction in separate analysis plays a smaller role than the usual designs with smaller $n_i$. Therefore, the p-value for the $[1000-0]$ comparison of $p^{\text{males only}}=0.0019$ is relatively much smaller compared to the joint test of $p^{\text{joint test}}=0.0064$.\\
The simultaneous two-sided confidence intervals in Figure 2 allow a qualitative interpretation in the percentage scale of the relative liver weights.
\begin{figure}[htbp]
	\centering
		\includegraphics[width=0.50\textwidth]{CIliv.jpeg}
	\caption{Joint test: simultaneous confidence intervals for the difference to control}
	\label{fig:CIliv}
\end{figure}



For a toxicological view, a liver weight reduction in the two high doses (1000,500) can be selectively detected in males only. The pooled analysis is biased.\\

\section{Conclusions}
For the evaluation of possible sex-specific effects in \textit{in-vivo} toxicology of joint Dunnett-type test considering males, females and pooled analysis by means of a combined contrast matrix. Simultaneous confidence intervals or adjusted p-values are available by means of the R package multcomp. Interpretation of possible compound-related effects is straightforward.\\
Generalizations for counts, proportions and poly-k estimates in the generalized linear model as well as for non-parametric models \cite{Konietschke2012} and variance heterogeneity will be presented soon. Furthermore, this joint test will soon be available for the Williams-Trend test to examine monotonous effects.




\bibliographystyle{plain}
\footnotesize


