freq_pair_wtd_t_test: Frequentist Test Comparisons Between Weighted Means

Description Usage Arguments Details Value See Also Examples

View source: R/freq_pair_wtd_t_test.R

Description

Calculate weighted pairwise comparisons between group levels with corrections for multiple testing

Usage

1
2
freq_pair_wtd_t_test(x, subgroup, weight = NULL,
  p.adjust.method = p.adjust.methods, ...)

Arguments

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

Details

This is a wrapper for pairwise.t.test but allowing for means with post-stratification weights applied.

Value

Object of class "pairwise.htest"

See Also

pairwise.t.test, wtd.mean

Examples

 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")

philstraforelli/ggsigmark documentation built on April 3, 2018, 12:07 p.m.