-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
69 lines (51 loc) · 1.43 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
---
output: github_document
bibliography: vignettes/references.bib
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# poset
The **poset** package provides simple and efficient statistical routines for partially ordered data,
such as multivariate ordinal response under consensus or prioritized order.
The current version focuses on the win ratio/net benefit approach [@mao2024] via generalized
pairwise comparisons [@buyse2010].
## Installation
Install **poset** from CRAN with:
``` r
install.packages("poset")
```
You can install the development version from GitHub with:
```{r, eval = FALSE}
# install.packages("devtools")
devtools::install_github("lmaowisc/poset")
```
## Examples
Here is a basic example for two-sample testing and regression.
```{r example}
library(poset)
## data example
head(liver)
```
### Compare bivariate ratings by fibrosis stage
```{r}
Y1 <- liver[liver$AF, c("R1NASH", "R2NASH")] # advanced
Y0 <- liver[!liver$AF, c("R1NASH", "R2NASH")] # not advanced
wrtest(Y1, Y0)
```
### Regression analysis
```{r}
Y <- 5 - liver[, c("R1NASH", "R2NASH")] # lower score is better
Z <- cbind("Female" = liver$Sex == "F",
liver[, c("AF", "Steatosis", "SSF2", "LSN")]) # covariates
obj <- wreg(Y, Z) # fit model
obj
summary(obj)
```
## References