Description Usage Arguments Details Value See Also Examples
View source: R/freq_pair_wtd_t_test.R
Calculate weighted pairwise comparisons between group levels with corrections for multiple testing
1 2 | freq_pair_wtd_t_test(x, subgroup, weight = NULL,
p.adjust.method = p.adjust.methods, ...)
|
x |
A numerical vector that is being compared across subgroups |
subgroup |
A grouping vector or factor of the subgroups. It must be the same length as 'x'. |
weight |
A post-stratification weight vector. It must be the same length as 'x'. |
p.adjust.method |
The method for adjusting p-values. |
... |
Additional arguments passed on to t.test |
This is a wrapper for pairwise.t.test but allowing for means with post-stratification weights applied.
Object of class "pairwise.htest"
pairwise.t.test, wtd.mean
1 2 3 4 5 6 7 8 9 10 | #Without weights
Ozone <- airquality$Ozone
Month <- factor(airquality$Month, labels = month.abb[5:9])
freq_pair_wtd_t_test(Ozone, Month)
freq_pair_wtd_t_test(Ozone, Month, p.adj = "bonf")
#With weights
Weights <- rnorm(153, mean = 1, sd = 0.3)
freq_pair_wtd_t_test(Ozone, Month, Weights)
freq_pair_wtd_t_test(Ozone, Month, Weights, p.adj = "bonf")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.