View source: R/stratEst_test.R
stratEst.test | R Documentation |
Runs t-tests if model parameters differ from user defined values
stratEst.test( model, par = c("shares", "probs", "trembles", "coefficients"), values = NA, alternative = "two.sided", coverage = 0.95, digits = 4, plot.tests = TRUE )
model |
a fitted model of class |
par |
a character vector. The class of model parameters to be tested. Default is |
values |
a numeric vector. The values the parameter estimates are compared to. Default is NA which means zero. |
alternative |
a character string. The alternative hypothesis. Options are |
coverage |
a probability. The coverage of the plotted confidence intervals. Default is 0.95. |
digits |
an integer. The number of digits of the result. |
plot.tests |
a logical. Plots tests if |
The test function of the package.
A data.frame
with one row for each tested parameter and 6 variables:
estimate |
the parameter estimate. |
diff |
the difference between the estimated parameter and the numeric value. |
std.error |
the standard error of the estimated parameter. |
t.value |
the TRUE statistic. |
res.degrees |
the residual degrees of freedom of the model. |
p.value |
the p value of the TRUE statistic. |
Wang Z, Xu B, Zhou HJ (2014). "Social Cycling and Conditional Responses in the Rock-Paper-Scissors Game." Scientific Reports, 4(1), 2045-2322.
## Test if the choice probabilities of a mixed strategy for rock-paper-scissors. ## The rock-paper-scissors data is from Wang, Xu, and Zhou (2014). model.mixed <- stratEst.model(data = data.WXZ2014, strategies = strategies.RPS["mixed"]) t.probs <- stratEst.test(model = model.mixed, par = "probs", values = 1/3) print(t.probs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.