margin.c: Create a multi-factor vector of weights

Description Usage Arguments Value Author(s)

Description

Create a vector of weights for use in 'contrast()' by specifying marginal weights per factor. Use this function instead of step 3 in Follow-Up Contrasts and Post-Hoc Tests in aov_car.

Usage

1
margin.c(x, .grid, con.name = "contrast1")

Arguments

x

a list, made of tag-value pairs (see list), each pair corresponding to a factor:

  • tag - must match an existing factor name (rg is used to confirm this).

  • value - a vector of marginal weights, the length of which must match the number of levels of the specified factor.

con.name

a charecter vector with the name of the contrast (as will appear in the output of contrast).

rg

a ref.grid object made with lsmeans.

Value

a vector of weights, to be used in contrast.

Author(s)

Mattan S. Ben-Shachar


mattansb/marginC documentation built on May 28, 2019, 3:39 p.m.