View source: R/advanced-models.R
| nptrend | R Documentation |
Tests for monotonic trend across ordered groups, including quantitative and binary outcomes and hierarchical strata.
nptrend(x,
by,
data = NULL,
method = c("auto",
"cuzick",
"cochran-armitage",
"spearman",
"linear"),
event = NULL,
scores = NULL,
digits = 3,
p_digits = 3,
show = TRUE,
console = FALSE)
x |
Outcome variable. |
by |
Ordered group. With |
data |
Data frame or active data. |
method |
Automatic, Cuzick-style rank trend, Cochran-Armitage, Spearman, or linear trend. |
event |
Event value for binary trend analysis. |
scores |
Optional numeric scores for group levels. |
digits, p_digits, show, console |
Formatting/display controls. |
An R4VN result object, invisibly.
kwallis
d <- data.frame(y = c(2,3,4,4,5,7,8,9,10), dose = ordered(rep(1:3, each=3)))
nptrend(y, by = dose, data = d)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.