p_test | R Documentation |
Specify an outcome variable and return p-test outputs. All numeric variables in the dataset are used as predictor variables.
p_test(data, outcome, behavior, paired = FALSE)
data |
A Person Query dataset in the form of a data frame. |
outcome |
A string specifying the name of a binary variable, i.e. can only contain the values 1 or 0. Used to group the two distributions. |
behavior |
A character vector specifying the column to be used as the behavior to test. |
paired |
Specify whether the dataset is paired or not. Defaults to
|
This function is a wrapper around wilcox.test()
from 'stats'.
Returns a numeric value representing the p-value outcome of the test.
Mark Powers mark.powers@microsoft.com
Other Support:
camel_clean()
,
check_inputs()
,
combine_signals()
,
cut_hour()
,
extract_date_range()
,
extract_hr()
,
heat_colours()
,
is_date_format()
,
maxmin()
,
pairwise_count()
,
plot_WOE()
,
read_preamble()
,
rgb2hex()
,
totals_bind()
,
totals_col()
,
totals_reorder()
,
tstamp()
,
us_to_space()
,
wrap()
# Simulate a binary variable X
# Returns a single p-value
library(dplyr)
sq_data %>%
mutate(X = ifelse(Email_hours > 6, 1, 0)) %>%
p_test(outcome = "X", behavior = "External_network_size")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.