Description Usage Arguments Details Value Examples
Tool to do a two-sided permutation test on a dataset.
1 | permutation(groups, observations, method = "mean", nPerm = 10^5)
|
groups |
The column of the datasat containing the two groups. Has to be factors. |
observations |
The column of the dataset containing the observations for the two groups. Has to be numeric. |
method |
One of 3 options: "mean" (Default), "median" or "my_method". If "my_method", the user has to define a function called "my_method(observations)" that calculates the test-statistic, with the only input being the observations from the data grouped by group. |
nPerm |
Number of permutations. Default is 10^5 |
Given a dataset where one column specifies the groups and another column specifies the observed values for each group, the function makes a two-sided permuation test. The method to calculate the test statistic used for the test can either be mean, median or a user defined method. Summary, plot or print can be called on the output of class "permutation" and "htest".
a list of class object "htest" and "permutation".
1 2 3 4 5 6 7 | The test data provided in the package, BloodPressure, can be used as follows:
permutation(groups = BloodPressure$Groups, observations = BloodPressure$Blood_pressure, method = "median", nPerm = 10^4)
summary(permutation)
plot(permutation)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.