randomnessMenu {RcmdrPlugin.TeachStat}R Documentation

Randomness test

Description

In the "Nonparametric Tests" menu, two new entries are provided to perform the randomness test.

The first "Randomness test for two level factor..." can be used to contrast the randomness of a factor with two levels. This option use the function runs.test from tseries package. runs.test.

The second entry in the menu "Randomness test for numeric variable..." is used to test the randomness of a numerical variable. This option use the function runs.test from randtest package.

Details

Here is an example of "Randomness test for a two level factor..." menu entry.

Load data "AMSsurvey" selecting from Rcmdr menu: "Data" -> "Data in packages" -> "Read data set from an attached package..." then double-click on "car", click on "AMSsurvey" and on "OK". Rcmdr reply with the following command in source pane (R Script)

data(AMSsurvey, package="car")

To make randomness test on variable "sex", select from Rcmdr menu: "Statistics" -> "Nonparametric tests" -> "Randomness test for two level factor..." select "sex" and "OK". Rcmdr reply with the following command in source pane (R Script)

with(AMSsurvey, twolevelfactor.runs.test(sex))

Here is an example of "Randomness test for a numeric variable..." menu entry.

Load data "sweetpotato" selecting from Rcmdr menu: "Data" -> "Data in packages" -> "Read data set from an attached package..." then double-click on "randtests", click on "sweetpotato" and on "OK". Rcmdr reply with the following command in source pane (R Script)

data(sweetpotato, package="randtests")

sweetpotato <- as.data.frame(sweetpotato)

To make randomness test on variable "yield", select from Rcmdr menu: "Statistics" -> "Nonparametric tests" -> "Randomness test for numeric variable..." select "yield" and "OK". Rcmdr reply with the following command in source pane (R Script)

with(sweetpotato, numeric.runs.test(yield))

Author(s)

Manuel Munoz-Marquez <manuel.munoz@uca.es>

See Also

For more information see Rcmdr-package.


[Package RcmdrPlugin.TeachStat version 1.1.3 Index]