ChiSq
Description
The td_chi_sq_sqle()
function performs Pearson's chi-squared (χ2) test for independence,
which determines if there is a statistically significant difference between
the expected and observed frequencies in one or more categories of a
contingency table (also called a cross tabulation).
Usage
td_chi_sq_sqle (
data = NULL,
alpha = 0.05,
...
)
Arguments
data |
Required Argument. |
alpha |
Optional Argument. |
... |
Specifies the generic keyword arguments SQLE functions accept. persist: volatile: Function allows the user to partition, hash, order or local order the input data. These generic arguments are available for each argument that accepts tbl_teradata as input and can be accessed as:
Note: |
Value
Function returns an object of class "td_chi_sq_sqle"
which is a named list containing object of class "tbl_teradata".
Named list member(s) can be referenced directly with the "$" operator
using the name(s):
output.data
result
Examples
# Get the current context/connection.
con <- td_get_context()$connection
# Load the example data.
loadExampleData("tdplyr_example", "chi_sq")
# Create tbl_teradata object.
chi_sq_data <- tbl(con, "chi_sq")
# Check the list of available analytic functions.
display_analytic_functions()
# Example: Run td_chi_sq_sqle() with all arguments.
obj <- td_chi_sq_sqle(data=chi_sq_data,
alpha=0.5)
# Print the output and expected values tbl_teradata.
print(obj$result)
print(obj$output.data)