View source: R/tonetest_function.R
tonetest | R Documentation |
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.
tonetest(response, trat, mu = 0, alternative = "two.sided", conf.level = 0.95)
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" |
conf.level |
confidence level of the interval. |
returns a list with the mean per treatment, maximum, minimum, sample standard deviation, confidence interval, t-test statistic and its p-value.
No treatment can have zero variability. Otherwise the function will result in an error.
Gabriel Danilo Shimizu
library(AgroR)
data("pomegranate")
tonetest(resp=pomegranate$WL,
trat=pomegranate$trat,
mu=2,
alternative = "greater")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.