Description Usage Arguments Value Deprecated Function References See Also Examples

View source: R/infer-chisq-gof-test.R

Test whether the observed proportions for a categorical variable differ from hypothesized proportions

1 | ```
infer_chisq_gof_test(data, x, y, correct = FALSE)
``` |

`data` |
a |

`x` |
factor; column in |

`y` |
expected proportions |

`correct` |
logical; if TRUE continuity correction is applied |

`infer_chisq_gof_test`

returns an object of class
`"infer_chisq_gof_test"`

. An object of class `"infer_chisq_gof_test"`

is a list containing the following components:

`chisquare` |
chi square statistic |

`pvalue` |
p-value |

`df` |
chi square degrees of freedom |

`ssize` |
number of observations |

`names` |
levels of |

`level` |
number of levels of |

`obs` |
observed frequency/proportion |

`exp` |
expected frequency/proportion |

`deviation` |
deviation of observed from frequency |

`std` |
standardized residuals |

`varname` |
name of categorical variable |

`chisq_gof()`

has been deprecated. Instead use
`infer_chisq_gof_test()`

Sheskin, D. J. 2007. Handbook of Parametric and Nonparametric Statistical Procedures, 4th edition. : Chapman & Hall/CRC.

1 2 3 4 | ```
infer_chisq_gof_test(hsb, race, c(20, 20, 20, 140))
# apply continuity correction
infer_chisq_gof_test(hsb, race, c(20, 20, 20, 140), correct = TRUE)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.