Learn R Programming

nullabor (version 0.3.12)

null_permute: Generate null data by permuting a variable.

Description

Null hypothesis: variable is independent of others

Usage

null_permute(var)

Value

a function that given data generates a null data set. For use with lineup or rorschach

Arguments

var

name of variable to permute

See Also

null_lm, null_dist

Examples

Run this code
data(mtcars)
library(ggplot2)
ggplot(data=rorschach(method=null_permute("mpg"), n = 3, true=mtcars)) +
geom_boxplot(aes(x=factor(cyl), y=mpg, fill=factor(cyl))) +facet_grid(.~.sample) +
theme(legend.position="none", aspect.ratio=1)

Run the code above in your browser using DataLab