tonetest: Analysis: t test to compare means with a reference value
Description
Sometimes the researcher wants to test whether the treatment mean is greater than/equal to or less than a reference value. For example, I want to know if the average productivity of my treatment is higher than the average productivity of a given country. For this, this function allows comparing the means with a reference value using the t test.
Usage
tonetest(response, trat, mu = 0, alternative = "two.sided", conf.level = 0.95)
Value
returns a list with the mean per treatment, maximum, minimum, sample standard deviation, confidence interval, t-test statistic and its p-value.
Arguments
response
Numerical vector containing the response of the experiment.
trat
Numerical or complex vector with treatments
mu
A number indicating the true value of the mean
alternative
A character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less"