Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

percent.ttest

Hypothesis test for two means of percentages


Description

Hypothesis test for two means of percentages.

Usage

percent.ttest(x, y, logged = FALSE)

Arguments

x

A numerical vector with the percentages of the first sample. Any value between 0 and 1 (inclusive) is allowed.

y

A numerical vector with the percentages of the first sample. Any value between 0 and 1 (inclusive) is allowed.

logged

Should the p-values be returned (FALSE) or their logarithm (TRUE)?

Details

This is the prop.reg but with a single categorical predictor which has two levels only. It is like a t-test for the means of two samples haivng percentages.

Value

A vector with three elements, the phi parameter, the test statistic and its associated p-value.

Author(s)

Michail Tsagris

R implementation and documentation: Michail Tsagris <mtsagris@yahoo.gr> and Manos Papadakis <papadakm95@gmail.com>.

References

Papke L. E. & Wooldridge J. (1996). Econometric methods for fractional response variables with an application to 401(K) plan participation rates. Journal of Applied Econometrics, 11(6): 619-632.

McCullagh, Peter, and John A. Nelder. Generalized linear models. CRC press, USA, 2nd edition, 1989.

See Also

link{percent.ttests}, prop.reg, ttest2, ftest

Examples

x <- rbeta(100, 3, 1)
y <- rbeta(100, 7.5, 2.5)
res<-percent.ttest(x, y)

Rfast

A Collection of Efficient and Extremely Fast R Functions

v2.0.1
GPL (>= 2.0)
Authors
Manos Papadakis, Michail Tsagris, Marios Dimitriadis, Stefanos Fafalios, Ioannis Tsamardinos, Matteo Fasiolo, Giorgos Borboudakis, John Burkardt, Changliang Zou, Kleanthi Lakiotaki and Christina Chatzipantsiou.
Initial release
2020-09-13

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.