Learn R Programming

jmv (version 0.7.0.3)

propTestN: Proportion Test (N Outcomes)

Description

chi² Goodness of fit

Usage

propTestN(data, var, counts = NULL, expected = FALSE, ratio = NULL)

Arguments

data
the data as a data frame
var
a string naming the variable of interest in data
counts
a string naming a variable in data containing counts, or NULL if each row represents a single observation
expected
TRUE or FALSE (default), whether expected counts should be displayed
ratio
a vector of numbers: the expected proportions

Examples

Run this code
## Not run: ------------------------------------
# propTestN(data, var="outcome", ratio=c(1,1,1))
## ---------------------------------------------

Run the code above in your browser using DataLab