Skip to content

Commit

Permalink
minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
qddyy committed Nov 15, 2023
1 parent 548e1cc commit 8ffdf44
Show file tree
Hide file tree
Showing 5 changed files with 475 additions and 447 deletions.
10 changes: 6 additions & 4 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ output:
df_print: kable
fig_width: 8
fig_height: 6
dev: svg
---

```{r, setup, include = FALSE}
options(cli.progress_show_after = Inf)
knitr::opts_chunk$set(
collapse = TRUE, comment = "#>",
fig.path = "man/figures/README-", out.width = "100%"
Expand Down Expand Up @@ -50,7 +52,7 @@ pak::pkg_install("qddyy/LearnNonparam")
```
- Test some data (`vector` | `data.frame` | `list`)
```{r, test, include = FALSE}
```{r, test}
set.seed(2023)
t$test(rnorm(20, mean = 1), rnorm(20, mean = 0))
```
Expand Down Expand Up @@ -84,8 +86,8 @@ t <- pmt(...)$test(...)$print(...)$plot(...)
- Check
- `?PermuTest` (all tests' base class) for all available methods and attributes.
- `pmts()` for all available tests.
```{r, pmts}
pmts()
```
```{r, pmts}
pmts()
```
## References
72 changes: 39 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,16 @@ pak::pkg_install("qddyy/LearnNonparam")

- Test some data (`vector` \| `data.frame` \| `list`)

``` r
set.seed(2023)
t$test(rnorm(20, mean = 1), rnorm(20, mean = 0))
```

- Check the results

``` r
t$p_value
#> [1] 0.0013138
#> [1] 0.0013154

t$print(digits = 2)
#>
Expand All @@ -62,7 +67,7 @@ pak::pkg_install("qddyy/LearnNonparam")
t$plot(binwidth = 1)
```

<img src="man/figures/README-results-1.png" width="100%" />
<img src="man/figures/README-results-1.svg" width="100%" />

- Modify some attributes and see how the results change

Expand Down Expand Up @@ -90,39 +95,40 @@ t <- pmt(...)$test(...)$print(...)$plot(...)

- `?PermuTest` (all tests’ base class) for all available methods and
attributes.
- `pmts()` for all available tests.

``` r
pmts()
```
- `pmts()` for all available tests.

<div class="kable-table">

| key | class | test |
|:---------------------|:-------------------|:-----------------------------------------------------|
| onesample.quantile | Quantile | Quantile Test |
| onesample.cdf | CDF | Cumulative Distribution Function |
| twosample.difference | Difference | Two Sample Test Based on Mean or Median |
| twosample.wilcoxon | Wilcoxon | Two Sample Wilcoxon Test |
| twosample.scoresum | ScoreSum | Score Sum Test |
| twosample.ansari | AnsariBradley | Ansari-Bradley Test |
| twosample.siegel | SiegelTukey | Siegel-Tukey Test |
| twosample.rmd | RatioMeanDeviance | Ratio Mean Deviance Test |
| twosample.ks | KolmogorovSmirnov | Two Sample Kolmogorov-Smirnov Test |
| ksample.anova | ANOVA | K Sample Test Based on F Statistic |
| ksample.kw | KruskalWallis | Kruskal-Wallis Test |
| ksample.jt | JonckheereTerpstra | Jonckheere-Terpstra Test |
| multicomp.t | MultiCompT | Multiple Comparison Based on t Statistic |
| multicomp.tukey | TukeyHSD | Tukey’s HSD |
| paired.sign | Sign | Sign Test |
| paired.signeddiff | SignedDiff | Paired Comparison Based on Signed Differences |
| rcbd.anova | RCBDANOVA | ANOVA for Randomized Complete Block Design |
| rcbd.friedman | Friedman | Friedman Test |
| rcbd.page | Page | Page Test |
| association.corr | Correlation | Two Sample Test Based on Correlation Coefficient |
| table.chisq | ChiSquare | Contingency Table Test Based on Chi-square Statistic |

</div>
``` r
pmts()
```

<div class="kable-table">

| key | class | test |
|:---------------------|:-------------------|:-----------------------------------------------------|
| onesample.quantile | Quantile | Quantile Test |
| onesample.cdf | CDF | Cumulative Distribution Function |
| twosample.difference | Difference | Two Sample Test Based on Mean or Median |
| twosample.wilcoxon | Wilcoxon | Two Sample Wilcoxon Test |
| twosample.scoresum | ScoreSum | Score Sum Test |
| twosample.ansari | AnsariBradley | Ansari-Bradley Test |
| twosample.siegel | SiegelTukey | Siegel-Tukey Test |
| twosample.rmd | RatioMeanDeviance | Ratio Mean Deviance Test |
| twosample.ks | KolmogorovSmirnov | Two Sample Kolmogorov-Smirnov Test |
| ksample.anova | ANOVA | K Sample Test Based on F Statistic |
| ksample.kw | KruskalWallis | Kruskal-Wallis Test |
| ksample.jt | JonckheereTerpstra | Jonckheere-Terpstra Test |
| multicomp.t | MultiCompT | Multiple Comparison Based on t Statistic |
| multicomp.tukey | TukeyHSD | Tukeys HSD |
| paired.sign | Sign | Sign Test |
| paired.signeddiff | SignedDiff | Paired Comparison Based on Signed Differences |
| rcbd.anova | RCBDANOVA | ANOVA for Randomized Complete Block Design |
| rcbd.friedman | Friedman | Friedman Test |
| rcbd.page | Page | Page Test |
| association.corr | Correlation | Two Sample Test Based on Correlation Coefficient |
| table.chisq | ChiSquare | Contingency Table Test Based on Chi-square Statistic |

</div>

## References

Expand Down
Binary file removed man/figures/README-results-1.png
Binary file not shown.
Loading

0 comments on commit 8ffdf44

Please sign in to comment.