FTest
Description
The td_ftest_sqle()
function performs an F-test, for which the test statistic follows an
F-distribution under the Null hypothesis.
Function compares the variances of two independent populations.
If the variances are significantly different, the td_ftest_sqle()
function rejects the
Null hypothesis, indicating that the variances may not come from the same
underlying population.
Use the function to compare statistical models that have been fitted to a
data set, to identify the model that best fits the population from which the data
were sampled.
Usage
td_ftest_sqle (
data = NULL,
alpha = NULL,
first.sample.variance = NULL,
first.sample.column = NULL,
df1 = NULL,
second.sample.variance = NULL,
second.sample.column = NULL,
df2 = 2,
alternate.hypothesis = 'two-tailed',
...
)
Arguments
data |
Required Argument. |
alpha |
Optional Argument. |
first.sample.variance |
Required if "first.sample.column" is omitted, disallowed otherwise. |
first.sample.column |
Required if "first.sample.variance" is omitted, disallowed otherwise. |
df1 |
Required if "first.sample.column" is omitted, disallowed otherwise. |
second.sample.variance |
Required if "second.sample.column" is omitted, disallowed otherwise. |
second.sample.column |
Required if "second.sample.variance" is omitted, disallowed otherwise. |
df2 |
Required if "second.sample.column" is omitted, disallowed otherwise. |
alternate.hypothesis |
Optional Argument.
Default Value: two-tailed |
... |
Specifies the generic keyword arguments SQLE functions accept. 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_ftest_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):result
Examples
# Get the current context/connection.
con <- td_get_context()$connection
# Load the example data.
loadExampleData("tdplyr_example", "titanic")
# Create tbl_teradata object.
titanic_data <- tbl(con, "titanic")
# Check the list of available analytic functions.
display_analytic_functions()
# Example 1: Run td_ftest_sqle() with first.sample.variance, second.sample.variance,
# df1 and df2.
obj <- td_ftest_sqle(data=titanic_data,
alpha=0.5,
second.sample.column="parch",
alternate.hypothesis="two-tailed",
first.sample.variance=5,
second.sample.variance=8,
df1=1,
df2=2
)
# Print the result.
print(obj$result)
# Example 2: Run td_ftest_sqle() with only required arguments.
obj <- td_ftest_sqle(data=titanic_data,
second.sample.column="parch",
second.sample.variance=8,
df2=2
)
# Print the result.
print(obj$result)