xlevels: Create 'derivatives' and 'means' of factors to generate, for...

Description Usage Arguments Functions

Description

The functions xlevels and dlevels are primarily intended to create arguments for expand.grid to create 'prediction' or 'effect data frames', to generate wald tests and estimates of specific effects in models with interactions,

Usage

1
2
3
xlevels(f, type = c("raw", "<mean>"), all = FALSE, sep = "")

dlevels(f, type = "pairwise", all = FALSE, sep = "")

Arguments

f

a factor or otherwise a vector interpreted as the levels of a factor

type

one or more types of contrasts ('derivative') or means (convex combinations) of factor levels

all

for some values of type, indicates whether to use all contrasts. e.g. type = "pairwise" will produce pairwise comparisons in both directions if all == TRUE

sep

can add spaces in constructed factor levels

w

weights used for each factor level in creating contrasts differentiating a factor level from others. Weights corresponding to frequencies in the data frame result in effects corresponding to type II effects while equal weights correspond to type III effects for interacting specific effects

Functions


gmonette/spidanew documentation built on May 17, 2019, 7:27 a.m.