dredge_correlation: dredge_correlation

Description Usage Arguments Value Author(s) See Also Examples

Description

data dredge a data.frame using cor.test

Usage

1
2
dredge_correlation(data, grid, min_pvalue = getOption("mndredge_min_pvalue",
  0), max_pvalue = getOption("mndredge_max_pvalue", 0.05), ...)

Arguments

data

a data.frame to operate over

grid

a search grid in the form of make_correlation_grid to use in guiding the dredging

min_pvalue

the maximum the pvalue from lm can be before the result is filtered out. this generaly is an issue only in overfitted models or synthetic data

max_pvalue

the maximum the pvalue from lm can be before the result is filtered out

...

addtional parameters to pass to cor.test

Value

a tidy data.frame containing the following components:

column_a

the first column to compare

column_b

the second column to compare

estimate

the estimate from cor.test

p.value

the p.value from cor.test

lag

the amount of lag for the current compare

Author(s)

Mark Newman, mark@trinetteandmark.com

See Also

Other dredging: dredge_regression

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
  
  set.seed(0)
  y1 <- seq(-10, 10, .5)
  y2 <-
    y1 + y1 %>%
    length() %>%
    rnorm()
  registerDoParallel(cores=2)
  data <- data.frame(y1, y2)
  grid <- data %>% make_correlation_grid()
  data %>% dredge_correlation(grid)

markanewman/mndredge documentation built on May 9, 2019, 5:52 a.m.