View source: R/ttest_related_functions.R
Hypothesis test for two means of percentages | R Documentation |
Hypothesis test for two means of percentages.
percent.ttest(x, y, logged = FALSE)
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)? |
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.
A vector with three elements, the phi parameter, the test statistic and its associated p-value.
Michail Tsagris
R implementation and documentation: Michail Tsagris <mtsagris@uoc.gr> and Manos Papadakis <papadakm95@gmail.com>.
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.
link{percent.ttests}, prop.reg, ttest2, ftest
x <- rbeta(100, 3, 1)
y <- rbeta(100, 7.5, 2.5)
res<-percent.ttest(x, y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.