Tidy Simultaneous Confidence Intervals for Multinomial Proportions
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1.6 KiB

---
output: rmarkdown::github_document
editor_options:
chunk_output_type: console
---
```{r pkg-knitr-opts, include=FALSE}
hrbrpkghelpr::global_opts()
```

```{r badges, results='asis', echo=FALSE, cache=FALSE}
hrbrpkghelpr::stinking_badges()
```

```{r description, results='asis', echo=FALSE, cache=FALSE}
hrbrpkghelpr::yank_title_and_description()
```

## What's Inside The Tin

The following functions are implemented:

```{r ingredients, results='asis', echo=FALSE, cache=FALSE}
hrbrpkghelpr::describe_ingredients()
```

There's also a handy named vector `scimple_short_to_long` which you can use to expand
shorthand method names (e.g. "sg") to long (e.g. "Sison & Glaz").

### Installation

Package installation:

```{r install-ex, results='asis', echo=FALSE, cache=FALSE}
hrbrpkghelpr::install_block()
```

### Usage

```{r u01, fig.width=10, fig.height=5.5}
library(scimple)
library(hrbrthemes)
library(tidyverse)

y <- c(44, 55, 43, 32, 67, 78)
z <- 0.05

scimple_ci(y, z) %>%
mutate(method=scimple_short_to_long[method]) -> cis

print(cis)

ggplot(cis) +
geom_segment(aes(x=lower_limit, xend=upper_limit, y=method, yend=method, color=method)) +
scale_color_ipsum(name=NULL) +
facet_wrap(~inpmat, scales="free_x") +
labs(x=NULL, y=NULL,
title="Multipe simultaneous confidence intervals",
subtitle="Note free X scale") +
theme_ipsum_rc(grid="X", base_size=11) +
theme(legend.position="bottom")
```

## scimple Metrics

```{r cloc, echo=FALSE}
cloc::cloc_pkg_md()
```

## Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.