powered by
Hotelling's T-square test to check whether maic is needed
maicT2Test(ipd, ad, n.ad = Inf)
the value of the T^2 test statistic
the p-value corresponding to the test statistic. When the p-value is small, matching is necessary.
a dataframe with n row and p column, where n is number of subjects and p is the number of variables used in matching.
a dataframe with 1 row and p column. The matching variables should be in the same order as that in ipd. The function does not check this.
ipd
default is Inf assuming ad is a fixed (known) quantity with infinit accuracy. In most MAIC applications ad is the sample statistics and n.ad is known.
ad
n.ad
When n.ad is not Inf, the covariance matrix is adjusted by the factor n.ad/(n.ipd + n.ad)), where n.ipd is nrow(ipd), the sample size of ipd.
Glimm & Yau (2021). "Geometric approaches to assessing the numerical feasibility for conducting matching-adjusted indirect comparisons", Pharmaceutical Statistics, 21(5):974-987. doi:10.1002/pst.2210.
## eAD[1,] is the scenario A in the reference paper, ## i.e. when AD is perfectly within IPD maicT2Test(eIPD, eAD[1,2:3])
Run the code above in your browser using DataLab