Sum_of_Wishart_df {fPASS} | R Documentation |
The approximate degrees of freedom formula for sum of Wishart.
Description
The approximate degrees of freedom formula for sum of two
independent Wishart random variable
with parameter sig1 and sig2, and degrees of freedom n1-1 and n2-1
where n1 + n2 is equal to the total_sample_size
.
See Koner and Luo (2023) for more details on the formula for degrees of freedom.
Usage
Sum_of_Wishart_df(total_sample_size, alloc.ratio, sig1, sig2)
Arguments
total_sample_size |
Target sample size, must be a positive integer. |
alloc.ratio |
Allocation of total sample size into the two groups. Must set as a vector of two positive numbers. For equal allocation it should be put as c(1,1), for non-equal allocation one can put c(2,1) or c(3,1) etc. |
sig1 |
The true (or estimate) of covariance matrix for the first group. Must be symmetric
( |
sig2 |
The true (or estimate) of covariance matrix for the second group. Must be symmetric
( |
Value
The approximate degrees of freedom.
Author(s)
Salil Koner
Maintainer: Salil Koner
salil.koner@duke.edu
See Also
Sim_HotellingT_unequal_var()
and pHotellingT()
.
Examples
k <- 8
mu1 <- rep(0,k); del <- 0.4; mu2 <- mu1 + rep(del, k);
sig1 <- diag(k); sig2 <- sig1 + del*toeplitz(c(1,rep(0.5, k-1)))
alt.dist.samples <- Sum_of_Wishart_df(total_sample_size=150,
sig1=sig1, sig2=sig2, alloc.ratio=c(2,1))