# subtitle_onesample_proptest

##### Making text subtitle for Proportion Test (N Outcomes)

This is going to be a chi-squared Goodness of fit test.

##### Usage

```
subtitle_onesample_proptest(data, main, counts = NULL, ratio = NULL,
conf.level = 0.95, conf.type = "norm", nboot = 100,
stat.title = NULL, legend.title = NULL, k = 2, messages = TRUE,
...)
```

##### Arguments

- data
A dataframe (or a tibble) from which variables specified are to be taken. A matrix or tables will

**not**be accepted.- main
The variable to use as the

**rows**in the contingency table.- counts
A string naming a variable in data containing counts, or

`NULL`

if each row represents a single observation (Default).- ratio
A vector of numbers: the expected proportions for the proportion test. Default is

`NULL`

, which means if there are two levels`ratio = c(1,1)`

, etc.- conf.level
Scalar between 0 and 1. If unspecified, the defaults return

`95%`

lower and upper confidence intervals (`0.95`

).- conf.type
A vector of character strings representing the type of intervals required. The value should be any subset of the values

`"norm"`

,`"basic"`

,`"perc"`

,`"bca"`

. For more, see`?boot::boot.ci`

.- nboot
Number of bootstrap samples for computing confidence interval for the effect size (Default:

`100`

).- stat.title
Title for the effect being investigated with the chi-square test. The default is

`NULL`

, i.e. no title will be added to describe the effect being shown. An example of a`stat.title`

argument will be something like`"main x condition"`

or`"interaction"`

.- legend.title
Title text for the legend.

- k
Number of digits after decimal point (should be an integer) (Default:

`k = 2`

).- messages
Decides whether messages references, notes, and warnings are to be displayed (Default:

`TRUE`

).- ...
Additional arguments (currently ignored).

##### Details

For more details about how the effect sizes and their confidence
intervals were computed, see documentation in `?rcompanion::cramerVFit`

.

##### Examples

```
# NOT RUN {
# for reproducibility
set.seed(123)
library(jmv)
# with counts
subtitle_onesample_proptest(
data = as.data.frame(HairEyeColor),
main = Eye,
counts = Freq,
ratio = c(0.2, 0.2, 0.3, 0.3)
)
# in case of no variation, only sample size will be shown
subtitle_onesample_proptest(
data = cbind.data.frame(x = rep("a", 10)),
main = x
)
# }
```

*Documentation reproduced from package ggstatsplot, version 0.0.11, License: GPL-3 | file LICENSE*