Skip to content

Commit

Permalink
fix a bunch of URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
njtierney committed Mar 4, 2024
1 parent b7a5f6d commit 7b4657c
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 29 deletions.
8 changes: 4 additions & 4 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ knitr::opts_chunk$set(
# naniar <a href="http://naniar.njtierney.com/"><img src="man/figures/logo.png" align="right" height="138" /></a>

<!-- badges: start -->
[![R build status](https://github.com/njtierney/naniar/workflows/R-CMD-check/badge.svg)](https://github.com/njtierney/naniar) [![Coverage Status](https://img.shields.io/codecov/c/github/njtierney/naniar/master.svg)](https://codecov.io/github/njtierney/naniar?branch=master) [![CRAN Status Badge](https://www.r-pkg.org/badges/version/naniar)](https://cran.r-project.org/package=naniar) [![CRAN Downloads Each Month](https://cranlogs.r-pkg.org/badges/naniar)](https://CRAN.R-project.org/package=naniar) [![lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://lifecycle.r-lib.org/articles/stages.html)
[![R build status](https://github.com/njtierney/naniar/workflows/R-CMD-check/badge.svg)](https://github.com/njtierney/naniar) [![Coverage Status](https://img.shields.io/codecov/c/github/njtierney/naniar/master.svg)](https://app.codecov.io/github/njtierney/naniar?branch=master) [![CRAN Status Badge](https://www.r-pkg.org/badges/version/naniar)](https://cran.r-project.org/package=naniar) [![CRAN Downloads Each Month](https://cranlogs.r-pkg.org/badges/naniar)](https://CRAN.R-project.org/package=naniar) [![lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://lifecycle.r-lib.org/articles/stages.html)
<!-- badges: end -->

`naniar` provides principled, tidy ways to summarise, visualise, and manipulate missing data with minimal deviations from the workflows in ggplot2 and tidy data. It does this by providing:
Expand All @@ -29,7 +29,7 @@ knitr::opts_chunk$set(
- `miss_var_summary()` and `miss_var_table()`
- `miss_case_summary()`, `miss_case_table()`
- Statistical tests of missingness:
- `mcar_test()` for [Little's (1988)](https://doi.org/10.1080/01621459.1988.10478722) missing completely at random (MCAR) test
- `mcar_test()` for [Little's (1988)](https://www.tandfonline.com/doi/abs/10.1080/01621459.1988.10478722) missing completely at random (MCAR) test
- Visualisation for missing data:
- `geom_miss_point()`
- `gg_miss_var()`
Expand Down Expand Up @@ -59,7 +59,7 @@ remotes::install_github("njtierney/naniar")

# A short overview of naniar

Visualising missing data might sound a little strange - how do you visualise something that is not there? One approach to visualising missing data comes from [ggobi](http://ggobi.org/) and [manet](https://www.swmath.org/software/3067), which replaces `NA` values with values 10% lower than the minimum value in that variable. This visualisation is provided with the `geom_miss_point()` ggplot2 geom, which we illustrate by exploring the relationship between Ozone and Solar radiation from the airquality dataset.
Visualising missing data might sound a little strange - how do you visualise something that is not there? One approach to visualising missing data comes from [ggobi](http://ggobi.org/) and [manet](https://zbmath.org/software/3067), which replaces `NA` values with values 10% lower than the minimum value in that variable. This visualisation is provided with the `geom_miss_point()` ggplot2 geom, which we illustrate by exploring the relationship between Ozone and Solar radiation from the airquality dataset.

```{r regular-geom-point}
Expand Down Expand Up @@ -217,7 +217,7 @@ You can read more about all of these functions in the vignette ["Getting Started

# Statistical tests of missingness

naniar provides `mcar_test()` for [Little's (1988)](https://doi.org/10.1080/01621459.1988.10478722) statistical test for missing completely at random (MCAR) data. The null hypothesis in this test is that the data is MCAR, and the test statistic is a chi-squared value. Given the high statistic value and low p-value, we can conclude that the `airquality` data is not missing completely at random:
naniar provides `mcar_test()` for [Little's (1988)](https://www.tandfonline.com/doi/abs/10.1080/01621459.1988.10478722) statistical test for missing completely at random (MCAR) data. The null hypothesis in this test is that the data is MCAR, and the test statistic is a chi-squared value. Given the high statistic value and low p-value, we can conclude that the `airquality` data is not missing completely at random:

```{r mcar-test}
mcar_test(airquality)
Expand Down
36 changes: 19 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
[![R build
status](https://github.com/njtierney/naniar/workflows/R-CMD-check/badge.svg)](https://github.com/njtierney/naniar)
[![Coverage
Status](https://img.shields.io/codecov/c/github/njtierney/naniar/master.svg)](https://codecov.io/github/njtierney/naniar?branch=master)
Status](https://img.shields.io/codecov/c/github/njtierney/naniar/master.svg)](https://app.codecov.io/github/njtierney/naniar?branch=master)
[![CRAN Status
Badge](https://www.r-pkg.org/badges/version/naniar)](https://cran.r-project.org/package=naniar)
[![CRAN Downloads Each
Expand All @@ -30,8 +30,8 @@ ggplot2 and tidy data. It does this by providing:
- `miss_case_summary()`, `miss_case_table()`
- Statistical tests of missingness:
- `mcar_test()` for [Little’s
(1988)](https://doi.org/10.1080/01621459.1988.10478722) missing
completely at random (MCAR) test
(1988)](https://www.tandfonline.com/doi/abs/10.1080/01621459.1988.10478722)
missing completely at random (MCAR) test
- Visualisation for missing data:
- `geom_miss_point()`
- `gg_miss_var()`
Expand Down Expand Up @@ -68,11 +68,11 @@ remotes::install_github("njtierney/naniar")
Visualising missing data might sound a little strange - how do you
visualise something that is not there? One approach to visualising
missing data comes from [ggobi](http://ggobi.org/) and
[manet](https://www.swmath.org/software/3067), which replaces `NA`
values with values 10% lower than the minimum value in that variable.
This visualisation is provided with the `geom_miss_point()` ggplot2
geom, which we illustrate by exploring the relationship between Ozone
and Solar radiation from the airquality dataset.
[manet](https://zbmath.org/software/3067), which replaces `NA` values
with values 10% lower than the minimum value in that variable. This
visualisation is provided with the `geom_miss_point()` ggplot2 geom,
which we illustrate by exploring the relationship between Ozone and
Solar radiation from the airquality dataset.

``` r

Expand All @@ -82,7 +82,8 @@ ggplot(data = airquality,
aes(x = Ozone,
y = Solar.R)) +
geom_point()
#> Warning: Removed 42 rows containing missing values (`geom_point()`).
#> Warning: Removed 42 rows containing missing values or values outside the scale range
#> (`geom_point()`).
```

![](man/figures/README-regular-geom-point-1.png)<!-- -->
Expand Down Expand Up @@ -230,7 +231,8 @@ airquality %>%
y = Ozone,
colour = Ozone_NA)) +
geom_point()
#> Warning: Removed 7 rows containing missing values (`geom_point()`).
#> Warning: Removed 7 rows containing missing values or values outside the scale range
#> (`geom_point()`).
```

![](man/figures/README-shadow-impute-1.png)<!-- -->
Expand Down Expand Up @@ -308,7 +310,7 @@ which both return output ordered by the number of missing values.
miss_var_summary(airquality)
#> # A tibble: 6 × 3
#> variable n_miss pct_miss
#> <chr> <int> <num>
#> <chr> <int> <dbl>
#> 1 Ozone 37 24.2
#> 2 Solar.R 7 4.58
#> 3 Wind 0 0
Expand Down Expand Up @@ -352,7 +354,7 @@ airquality %>%
#> # A tibble: 25 × 4
#> # Groups: Month [5]
#> Month variable n_miss pct_miss
#> <int> <chr> <int> <num>
#> <int> <chr> <int> <dbl>
#> 1 5 Ozone 5 16.1
#> 2 5 Solar.R 4 12.9
#> 3 5 Wind 0 0
Expand All @@ -373,11 +375,11 @@ naniar”](https://naniar.njtierney.com/articles/getting-started-w-naniar.html).
# Statistical tests of missingness

naniar provides `mcar_test()` for [Little’s
(1988)](https://doi.org/10.1080/01621459.1988.10478722) statistical test
for missing completely at random (MCAR) data. The null hypothesis in
this test is that the data is MCAR, and the test statistic is a
chi-squared value. Given the high statistic value and low p-value, we
can conclude that the `airquality` data is not missing completely at
(1988)](https://www.tandfonline.com/doi/abs/10.1080/01621459.1988.10478722)
statistical test for missing completely at random (MCAR) data. The null
hypothesis in this test is that the data is MCAR, and the test statistic
is a chi-squared value. Given the high statistic value and low p-value,
we can conclude that the `airquality` data is not missing completely at
random:

``` r
Expand Down
8 changes: 2 additions & 6 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ NewMexico
Ni'a
Ni'o
O'hara
ORCID
POSIXct
POSIXt
Perfoms
Expand Down Expand Up @@ -72,7 +73,6 @@ codebook
colour
colouring
colours
cran
cumsum
customise
customised
Expand All @@ -92,6 +92,7 @@ filder
finalised
flavours
focussing
forcats
gdtools
generalise
geoms
Expand All @@ -103,9 +104,7 @@ ggproto
gh
github
helpfile
https
ing
io
jitter
jss
kep
Expand All @@ -132,14 +131,11 @@ overriden
pkgdown
plotly
pre
rdrr
readme
realised
recode
recoded
recoding
relevel
releveling
riskfactors
rlang's
roxygen
Expand Down
Binary file modified man/figures/README-facet-by-month-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-geom-miss-point-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-gg-miss-upset-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-shadow-impute-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-shadow-w-ggplot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions vignettes/getting-started-w-naniar.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ ggplot(airquality,
geom_point()
```

The problem with this is that ggplot does not handle missings be default, and removes the missing values. This makes them hard to explore. It also presents the strange question of "how do you visualise something that is not there?". One approach to visualising missing data comes from [`ggobi`](https://en.wikipedia.org/wiki/GGobi) and [`manet`](http://www.rosuda.org/MANET/), where we replace "NA" values with values 10% lower than the minimum value in that variable.
The problem with this is that ggplot does not handle missings be default, and removes the missing values. This makes them hard to explore. It also presents the strange question of "how do you visualise something that is not there?". One approach to visualising missing data comes from [`ggobi`](https://en.wikipedia.org/wiki/GGobi) and [`MANET`](https://www.rosuda.org/MANET/), where we replace "NA" values with values 10% lower than the minimum value in that variable.

This process is performed and visualised for you with the `geom_miss_point()` ggplot2 geom. Here, we illustrate by exploring the relationship between Ozone and Solar radiation from the airquality dataset.

Expand Down Expand Up @@ -484,7 +484,7 @@ Naming credit (once again!) goes to Miles McBain. Among various other things, Mi

# References

- MANET: http://www.rosuda.org/MANET/
- MANET: https://www.rosuda.org/MANET/
- ggobi: https://en.wikipedia.org/wiki/GGobi
- visdat: https://github.com/ropensci/visdat
- Tierney NJ, Harden FA, Harden MJ, Mengersen, KA, Using decision trees to understand structure in missing data BMJ Open 2015;5:e007450. doi: 10.1136/bmjopen-2014-007450

0 comments on commit 7b4657c

Please sign in to comment.