Description Usage Arguments Details Value Note Examples

Statistical tests for paired continuous variable.

1 |

`group` |
(fct) vector of groups |

`x` |
(num) vector of observations. Note: lenght of 'x' is considered equal to the number of subjects by the number of groups. Observation must be provided by subject (e.g. c(a1, b1, c1, a2, b2, c2, a3, b3, c3, a4, b4, c4), where the letters, a, b, c, and d represents the groups and the numbers represents the patien's ids). Note only patient with observation in all the levels considered will be used. |

If the test is requested for two paired groups, the
`t.test`

is used.

If the test is requested for more than two groups, the test based on
ANOVA for repeated measures is used (powered by
`aov`

)

A list with components 'P' (the computed P-value), 'stat' (the test statistic, either t or F), 'df' (degrees of freedom), 'testname' (test name), 'statname' (statistic name), 'namefun' ("paired_tstat", "rep_aov"), 'latexstat' (LaTeX representation of statname), 'plotmathstat' (for R - the plotmath representation of 'statname', as a character string), 'note' (contains a character string note about the test).

This function could be used as 'conTest' option in the
`summary.formula`

with method 'reverse'.

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 | ```
library(Hmisc)
## two groups
summary(Species ~.,
data = iris[iris$Species != "setosa",],
method = "reverse",
test = TRUE,
conTest = paired_test_continuous
)
## more than two groups
summary(Species ~.,
data = iris,
method = "reverse",
test = TRUE,
conTest = paired_test_continuous
)
## without Hmisc
two_obs <- iris$Sepal.Length[iris$Species != "setosa"]
two_groups <- iris$Species[iris$Species != "setosa"]
paired_test_continuous(two_groups, two_obs)
obs <- iris$Sepal.Length
many_groups <- iris$Species
paired_test_continuous(many_groups, obs)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.