make_alt_dat: Function to make alternate plot data

Description Usage Arguments Examples

View source: R/make_lineup_data.R

Description

capture mean structure between X and Y with local linear regression with optimal bandwidth, then permute residuals

Usage

1
2
make_alt_dat(dat, xname = "x", yname = "y", bootstrap = FALSE,
  jitter = 0, both = FALSE)

Arguments

dat

dataframe

xname

column name from dat for x-dimension in plots (defaults "x")

yname

column name from dat for y-dimension in plots (defaults "y")

bootstrap

logical indicator of if (bootstrap==TRUE) bootstrapping used, if (bootstrap==FALSE) then LOESS residuals permuted

jitter

amount of jitter to add to point locations - units of sds

both

logical indicator to run both LOESS residual permutation and bootstrapping of points

Examples

1
2
3
4
dat=data.frame(x=rnorm(25))
dat$y=dat$x+rnorm(25)
alt_dat <- make_alt_dat(dat)
alt_dat <- make_alt_dat(dat,bootstrap=T,jitter=T)

kmaurer/teaTasteR documentation built on Jan. 22, 2020, 5:18 a.m.