Calculating test statistics and p-values for the onesided Zmax / minP test.z
Given parameter estimates \((\widehat{\theta}_1, \ldots, \widehat{\theta}_p)^\top\) with approximate assymptotic covariance matrix \(\widehat{S}\), let \( Z_i = \frac{\widehat{\theta}_i - \delta_i}{\operatorname{SE}(\widehat{\theta}_i)}\) , where \(\operatorname{SE}(\widehat{\theta}_i) = \widehat{S}_{ii}\). The Zmax test statistic is then \(Z_{max} = \max \{Z_1,\ldots,Z_p\}\), and the null-hypothesis is \(H_0: \theta_i \leq \delta_i, i=1,\ldots,p\) with non-inferiority margin \(\delta_i, i=1,\ldots,p\), for which the p-value is calculated as \( 1 - \Phi_R(Z_{max}) \) where \(\phi_R\) is the CDF of the multivariate normal distribution with mean zero and correlation matrix \(R = \operatorname{diag}(S_{11}^{-0.5}, \ldots, S_{pp}^{-0.5})S\operatorname{diag}(S_{11}^{-0.5}, \ldots, S_{pp}^{-0.5})\).
