clean_formula | R Documentation |
This function processes and reformats formula string to ensure it is in the correct format for conditional independence testing. The function checks if the formula uses the '+' operator for additive models and transforms it into a format that includes a conditioning variable separated by '|'.
clean_formula(formula)
formula |
Formula. The model formula that specifies the relationship between the dependent and independent variables, and potentially the conditioning variables. The formula is expected to follow the format |
A reformatted formula in the correct format for conditional independence testing. The returned formula will either retain the original format or be transformed to include conditioning variables.
clean_formula(y ~ x | z + v)
clean_formula(y ~ x + z + v)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.