View source: R/TwoSamplesHT2.R

TwoSamplesHT2 | R Documentation |

`TwoSamplesHT2`

function computes Hotelling T^2 statistic for two
independent samples and gives confidence intervals.

```
TwoSamplesHT2(data, group, alpha = 0.05, Homogenity = TRUE)
```

`data` |
a data frame. |

`group` |
a group vector consisting of 1 and 2 values. |

`alpha` |
Significance Level that will be used for confidence intervals. default=0.05 |

`Homogenity` |
a logical argument. If sample covariance matrices are
homogeneity,then |

This function computes two independent samples Hotelling T^2 statistics
that is used to test
whether two population mean vectors are equal to each other.
When `H0`

is rejected, this function computes confidence intervals
for all variables to determine variable(s) affecting on rejection decision.
Moreover, when covariance matrices are not homogeneity, the approach proposed
by D. G. Nel and V. D. Merwe (1986) is used.

a list with 8 elements:

`HT2` |
The value of Hotelling T^2 Test Statistic |

`F` |
The value of F Statistic |

`df` |
The F statistic's degree of freedom |

`p.value` |
p value |

`CI` |
The lower and upper limits of confidence intervals obtained for all variables |

`alpha` |
The alpha value using in confidence intervals |

`Descriptive1` |
Descriptive Statistics for the first group |

`Descriptive2` |
Descriptive Statistics for the second group |

Hasan BULUT <hasan.bulut@omu.edu.tr>

Rencher, A. C. (2003). Methods of multivariate analysis (Vol. 492). John Wiley & Sons.

Tatlidil, H. (1996). Uygulamali Cok Degiskenli Istatistiksel Yontemler. Cem Web.

D.G. Nel & C.A. Van Der Merwe (1986) A solution to the multivariate behrens fisher problem, Communications in Statistics:Theory and Methods, 15:12, 3719-3735

```
data(iris)
G<-c(rep(1,50),rep(2,50))
# When covariances matrices are homogeneity
results1 <- TwoSamplesHT2(data=iris[1:100,1:4],group=G,alpha=0.05)
summary(results1)
# When covariances matrices are not homogeneity
results2 <- TwoSamplesHT2(data=iris[1:100,1:4],group=G,Homogenity=FALSE)
summary(results2)
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.