csf | R Documentation |
This function performs a Chi Sqare test for Goodness of Fit on one factor and returns reporting information on the model.
csf(x, y = NULL, probs = NULL)
x |
A formula ~Categorical Variable . |
y |
A data frame, necessary if data frame is not referenced in formula or piped in. |
probs |
A vector to test goodness of fit, must have same number of categories and add to 1 if percentages |
A list of output for reporting $analysis_type, $results, $fit_model, $observed, $expected, $standardized_residuals, $contribution, $table_percentages
x2_results <- x2_data %>% csf(~class_rank)
x2_results <- x2_data %>% csf(~class_rank,probs = c(500,147,24,39,111))
x2_results <- x2_data %>% csf(~class_rank,probs = c(.61, .18, .03, .05, .13))
x2_results <- csf(x2_data$class_rank)
x2_results <- csf(x2_data$class_rank,probs = c(500,147,24,39,111))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.